Ir para conteúdo
  • 0

[Spell] Hita E Paralisa Em Um Certo Tempo [Spell]


Flaah

Pergunta

Boa Tarde amigos do XTibia, tenho uma duvida nessa script, que seria:

 

Queria que ela paralisa-se o player inimigo e ficasse hitando o tbm, durante 5 segundos, ai quando os 5 segundos acabasse, os efeitos iriam sair.

 

Spell:

 

local TEMPO_PARA_REMOVER = 5 * 1000	-- em ms, 5 * 1000 = 5 segundos
local EFFECT_AO_REMOVER = CONST_ME_POFF	-- efeito que aparece ao remover os itens

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_CREATEITEM, 9612)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_CREATEITEM, 9611)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_CREATEITEM, 9619)

local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_CREATEITEM, 9618)

local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_CREATEITEM, 9617)

local combat6 = createCombatObject()
setCombatParam(combat6, COMBAT_PARAM_CREATEITEM, 9616)

local combat7 = createCombatObject()
setCombatParam(combat7, COMBAT_PARAM_CREATEITEM, 9615)

local combat8 = createCombatObject()
setCombatParam(combat8, COMBAT_PARAM_CREATEITEM, 9614)

local combat9 = createCombatObject()
setCombatParam(combat9, COMBAT_PARAM_CREATEITEM, 9613)

local combat10 = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 71)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 1, 2, 3, 4)


local arr1 = {
{1, 0, 0},
{0, 2, 0},
{0, 0, 0}
}
local arr2 = {
{0, 1, 0},
{0, 2, 0},
{0, 0, 0}
}
local arr3 = {
{0, 0, 1},
{0, 2, 0},
{0, 0, 0}
}
local arr4 = {
{0, 0, 0},
{1, 2, 0},
{0, 0, 0}
}
local arr5 = {
{0, 0, 0},
{0, 3, 0},
{0, 0, 0}
}
local arr6 = {
{0, 0, 0},
{0, 2, 1},
{0, 0, 0}
}
local arr7 = {
{0, 0, 0},
{0, 2, 0},
{1, 0, 0}
}
local arr8 = {
{0, 0, 0},
{0, 2, 0},
{0, 1, 0}
}
local arr9 = {
{0, 0, 0},
{0, 2, 0},
{0, 0, 1}
}
local arr10 = {
{1, 1, 1},
{1, 3, 1},
{1, 1, 1}
}
local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
local area5 = createCombatArea(arr5)
local area6 = createCombatArea(arr6)
local area7 = createCombatArea(arr7)
local area8 = createCombatArea(arr8)
local area9 = createCombatArea(arr9)
local area10 = createCombatArea(arr10)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
setCombatArea(combat4, area4)
setCombatArea(combat5, area5)
setCombatArea(combat6, area6)
setCombatArea(combat7, area7)
setCombatArea(combat8, area8)
setCombatArea(combat9, area9)
setCombatArea(combat10, area10)

function onTargetTile(cid, pos)
local function doRemoveItemFromPos(pos, id)
	local i = getTileItemById(pos, id).uid
	i = i > 1 and doRemoveItem(i) and true or false
	if i and tonumber(EFFECT_AO_REMOVER) and EFFECT_AO_REMOVER >= 0 and EFFECT_AO_REMOVER <= 255 then
		doSendMagicEffect(pos, EFFECT_AO_REMOVER)
	end
end
local iI = {getTileItemById(pos, 9613), getTileItemById(pos, 9614),  getTileItemById(pos, 9615),   getTileItemById(pos, 9616),   getTileItemById(pos, 9617),   getTileItemById(pos, 9618),   getTileItemById(pos, 9619),   getTileItemById(pos, 9611), getTileItemById(pos, 9612)}
for _, i in pairs (iI) do
	if i.uid > 1 then addEvent(doRemoveItemFromPos, TEMPO_PARA_REMOVER, pos, i.itemid) end
end
end

function onTargetTile1(cid, pos)
onTargetTile(cid, pos)
end
function onTargetTile2(cid, pos)
onTargetTile(cid, pos)
end
function onTargetTile3(cid, pos)
onTargetTile(cid, pos)
end
function onTargetTile4(cid, pos)
onTargetTile(cid, pos)
end
function onTargetTile5(cid, pos)
onTargetTile(cid, pos)
end
function onTargetTile6(cid, pos)
onTargetTile(cid, pos)
end
function onTargetTile7(cid, pos)
onTargetTile(cid, pos)
end
function onTargetTile8(cid, pos)
onTargetTile(cid, pos)
end
function onTargetTile9(cid, pos)
onTargetTile(cid, pos)
end
function onTargetTile10(cid, pos)
onTargetTile(cid, pos)
end

setCombatCallback(combat1, CALLBACK_PARAM_TARGETTILE, "onTargetTile1")
setCombatCallback(combat2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")
setCombatCallback(combat3, CALLBACK_PARAM_TARGETTILE, "onTargetTile3")
setCombatCallback(combat4, CALLBACK_PARAM_TARGETTILE, "onTargetTile4")
setCombatCallback(combat5, CALLBACK_PARAM_TARGETTILE, "onTargetTile5")
setCombatCallback(combat6, CALLBACK_PARAM_TARGETTILE, "onTargetTile6")
setCombatCallback(combat7, CALLBACK_PARAM_TARGETTILE, "onTargetTile7")
setCombatCallback(combat8, CALLBACK_PARAM_TARGETTILE, "onTargetTile8")
setCombatCallback(combat9, CALLBACK_PARAM_TARGETTILE, "onTargetTile9")
setCombatCallback(combat10, CALLBACK_PARAM_TARGETTILE, "onTargetTile10")

function doExecuteCombat(cid, var, combat)
if not isCreature(cid) then return true end
return doCombat(cid, combat, var)
end

function onCastSpell(cid, var)
local combats = {[1] = combat1, [2] = combat2, [3] = combat3, [4] = combat4, [5] = combat5, [6] = combat6, [7] = combat7, [8] = combat8, [9] = combat9, [10] = combat10}
for timing, c in pairs (combats) do
	addEvent(doExecuteCombat, timing, cid, var, c)
end

return true
end

 

OBS: Queria que fosse no combat10, que paralisa-se e ficasse hitando durante 5 segundo.

 

PS: Uma duvida, como eu edito essa formula?

setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 1, 2, 3, 4)

 

ALGUEM AJUDA PORFAVOR, VALENDO +REP

Editado por Flaah
Link para o comentário
Compartilhar em outros sites

14 respostass a esta questão

Posts Recomendados

  • 0

Sobre a formula é só vc alterar os numeros..obviamente q se aumentalos hitará mais a cada Magic Level..setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, MInA,MinB, MaxA,MaxB)

Agora sua Spell(PS:N testei)

local TEMPO_PARA_REMOVER = 5 * 1000 -- em ms, 5 * 1000 = 5 segundos

local EFFECT_AO_REMOVER = CONST_ME_POFF -- efeito que aparece ao remover os itens

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_CREATEITEM, 9612)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_CREATEITEM, 9611)

 

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_CREATEITEM, 9619)

 

local combat4 = createCombatObject()

setCombatParam(combat4, COMBAT_PARAM_CREATEITEM, 9618)

 

local combat5 = createCombatObject()

setCombatParam(combat5, COMBAT_PARAM_CREATEITEM, 9617)

 

local combat6 = createCombatObject()

setCombatParam(combat6, COMBAT_PARAM_CREATEITEM, 9616)

 

local combat7 = createCombatObject()

setCombatParam(combat7, COMBAT_PARAM_CREATEITEM, 9615)

 

local combat8 = createCombatObject()

setCombatParam(combat8, COMBAT_PARAM_CREATEITEM, 9614)

 

local combat9 = createCombatObject()

setCombatParam(combat9, COMBAT_PARAM_CREATEITEM, 9613)

 

local combat10 = createCombatObject()

setConditionParam(condition, CONDITION_PARAM_TICKS, 5000)

setCombatCondition(combat, condition)

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)

setCombatParam(combat, COMBAT_PARAM_EFFECT, 71)

setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 1, 2, 3, 4)

 

local arr1 = {

{1, 0, 0},

{0, 2, 0},

{0, 0, 0}

}

local arr2 = {

{0, 1, 0},

{0, 2, 0},

{0, 0, 0}

}

local arr3 = {

{0, 0, 1},

{0, 2, 0},

{0, 0, 0}

}

local arr4 = {

{0, 0, 0},

{1, 2, 0},

{0, 0, 0}

}

local arr5 = {

{0, 0, 0},

{0, 3, 0},

{0, 0, 0}

}

local arr6 = {

{0, 0, 0},

{0, 2, 1},

{0, 0, 0}

}

local arr7 = {

{0, 0, 0},

{0, 2, 0},

{1, 0, 0}

}

local arr8 = {

{0, 0, 0},

{0, 2, 0},

{0, 1, 0}

}

local arr9 = {

{0, 0, 0},

{0, 2, 0},

{0, 0, 1}

}

local arr10 = {

{1, 1, 1},

{1, 3, 1},

{1, 1, 1}

}

local area1 = createCombatArea(arr1)

local area2 = createCombatArea(arr2)

local area3 = createCombatArea(arr3)

local area4 = createCombatArea(arr4)

local area5 = createCombatArea(arr5)

local area6 = createCombatArea(arr6)

local area7 = createCombatArea(arr7)

local area8 = createCombatArea(arr8)

local area9 = createCombatArea(arr9)

local area10 = createCombatArea(arr10)

setCombatArea(combat1, area1)

setCombatArea(combat2, area2)

setCombatArea(combat3, area3)

setCombatArea(combat4, area4)

setCombatArea(combat5, area5)

setCombatArea(combat6, area6)

setCombatArea(combat7, area7)

setCombatArea(combat8, area8)

setCombatArea(combat9, area9)

setCombatArea(combat10, area10)

 

function onTargetTile(cid, pos)

local function doRemoveItemFromPos(pos, id)

local i = getTileItemById(pos, id).uid

i = i > 1 and doRemoveItem(i) and true or false

if i and tonumber(EFFECT_AO_REMOVER) and EFFECT_AO_REMOVER >= 0 and EFFECT_AO_REMOVER <= 255 then

doSendMagicEffect(pos, EFFECT_AO_REMOVER)

end

end

local iI = {getTileItemById(pos, 9613), getTileItemById(pos, 9614), getTileItemById(pos, 9615), getTileItemById(pos, 9616), getTileItemById(pos, 9617), getTileItemById(pos, 9618), getTileItemById(pos, 9619), getTileItemById(pos, 9611), getTileItemById(pos, 9612)}

for _, i in pairs (iI) do

if i.uid > 1 then addEvent(doRemoveItemFromPos, TEMPO_PARA_REMOVER, pos, i.itemid) end

end

end

 

function onTargetTile1(cid, pos)

onTargetTile(cid, pos)

end

function onTargetTile2(cid, pos)

onTargetTile(cid, pos)

end

function onTargetTile3(cid, pos)

onTargetTile(cid, pos)

end

function onTargetTile4(cid, pos)

onTargetTile(cid, pos)

end

function onTargetTile5(cid, pos)

onTargetTile(cid, pos)

end

function onTargetTile6(cid, pos)

onTargetTile(cid, pos)

end

function onTargetTile7(cid, pos)

onTargetTile(cid, pos)

end

function onTargetTile8(cid, pos)

onTargetTile(cid, pos)

end

function onTargetTile9(cid, pos)

onTargetTile(cid, pos)

end

function onTargetTile10(cid, pos)

onTargetTile(cid, pos)

end

 

setCombatCallback(combat1, CALLBACK_PARAM_TARGETTILE, "onTargetTile1")

setCombatCallback(combat2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")

setCombatCallback(combat3, CALLBACK_PARAM_TARGETTILE, "onTargetTile3")

setCombatCallback(combat4, CALLBACK_PARAM_TARGETTILE, "onTargetTile4")

setCombatCallback(combat5, CALLBACK_PARAM_TARGETTILE, "onTargetTile5")

setCombatCallback(combat6, CALLBACK_PARAM_TARGETTILE, "onTargetTile6")

setCombatCallback(combat7, CALLBACK_PARAM_TARGETTILE, "onTargetTile7")

setCombatCallback(combat8, CALLBACK_PARAM_TARGETTILE, "onTargetTile8")

setCombatCallback(combat9, CALLBACK_PARAM_TARGETTILE, "onTargetTile9")

setCombatCallback(combat10, CALLBACK_PARAM_TARGETTILE, "onTargetTile10")

 

function doExecuteCombat(cid, var, combat)

if not isCreature(cid) then return true end

return doCombat(cid, combat, var)

end

 

function onCastSpell(cid, var)

local combats = {[1] = combat1, [2] = combat2, [3] = combat3, [4] = combat4, [5] = combat5, [6] = combat6, [7] = combat7, [8] = combat8, [9] = combat9, [10] = combat10}

for timing, c in pairs (combats) do

addEvent(doExecuteCombat, timing, cid, var, c)

end

 

return true

end

Editado por victorvs
Link para o comentário
Compartilhar em outros sites

  • 0

Deu esse erro no console:

 

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile9
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:148: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:148: in function <data/spells/scripts/gennin/hinata/circulo.lua:147>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile6
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:139: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:139: in function <data/spells/scripts/gennin/hinata/circulo.lua:138>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile5
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:136: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:136: in function <data/spells/scripts/gennin/hinata/circulo.lua:135>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile10
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:151: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:151: in function <data/spells/scripts/gennin/hinata/circulo.lua:150>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile10
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:151: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:151: in function <data/spells/scripts/gennin/hinata/circulo.lua:150>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile10
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:151: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:151: in function <data/spells/scripts/gennin/hinata/circulo.lua:150>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile10
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:151: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:151: in function <data/spells/scripts/gennin/hinata/circulo.lua:150>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile10
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:151: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:151: in function <data/spells/scripts/gennin/hinata/circulo.lua:150>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile10
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:151: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:151: in function <data/spells/scripts/gennin/hinata/circulo.lua:150>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile10
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:151: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:151: in function <data/spells/scripts/gennin/hinata/circulo.lua:150>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile10
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:151: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:151: in function <data/spells/scripts/gennin/hinata/circulo.lua:150>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile10
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:151: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:151: in function <data/spells/scripts/gennin/hinata/circulo.lua:150>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile3
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:130: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:130: in function <data/spells/scripts/gennin/hinata/circulo.lua:129>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile7
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:142: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:142: in function <data/spells/scripts/gennin/hinata/circulo.lua:141>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile1
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:124: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:124: in function <data/spells/scripts/gennin/hinata/circulo.lua:123>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile4
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:133: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:133: in function <data/spells/scripts/gennin/hinata/circulo.lua:132>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile8
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:145: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:145: in function <data/spells/scripts/gennin/hinata/circulo.lua:144>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

[26/10/2012 14:10:23] [Error - Spell Interface]
[26/10/2012 14:10:23] In a callback: data/spells/scripts/gennin/hinata/circulo.lua:onTargetTile2
[26/10/2012 14:10:23] (Unknown script file)
[26/10/2012 14:10:23] Description:
[26/10/2012 14:10:23] data/spells/scripts/gennin/hinata/circulo.lua:127: attempt to call global 'onTargetTile' (a nil value)
[26/10/2012 14:10:23] stack traceback:
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:127: in function <data/spells/scripts/gennin/hinata/circulo.lua:126>
[26/10/2012 14:10:23]     [C]: in function 'doCombat'
[26/10/2012 14:10:23]     data/spells/scripts/gennin/hinata/circulo.lua:167: in function <data/spells/scripts/gennin/hinata/circulo.lua:165>

 

ALGUEM AJUDA PORFAVOR, VALENDO +REP

Link para o comentário
Compartilhar em outros sites

  • 0

Mano o negocio do tempo eu ja arrumei no item.xml, mais o do paralize o player inimigo e o proprio player, alem de fica hitando em seguida durante 5 segundos, n consegui.

 

SCRIPT NOVA:

 

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_CREATEITEM, 9612)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_CREATEITEM, 9611)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_CREATEITEM, 9619)

local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_CREATEITEM, 9618)

local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_CREATEITEM, 9617)

local combat6 = createCombatObject()
setCombatParam(combat6, COMBAT_PARAM_CREATEITEM, 9616)

local combat7 = createCombatObject()
setCombatParam(combat7, COMBAT_PARAM_CREATEITEM, 9615)

local combat8 = createCombatObject()
setCombatParam(combat8, COMBAT_PARAM_CREATEITEM, 9614)

local combat9 = createCombatObject()
setCombatParam(combat9, COMBAT_PARAM_CREATEITEM, 9613)

local combat9 = createCombatObject()
setCombatParam(combat9, COMBAT_PARAM_CREATEITEM, 9613)

local combat10 = createCombatObject()
setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setAttackFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, 1, 2, 3, 4)

local arr1 = {
{1, 0, 0},
{0, 2, 0},
{0, 0, 0}
}
local arr2 = {
{0, 1, 0},
{0, 2, 0},
{0, 0, 0}
}
local arr3 = {
{0, 0, 1},
{0, 2, 0},
{0, 0, 0}
}
local arr4 = {
{0, 0, 0},
{1, 2, 0},
{0, 0, 0}
}
local arr5 = {
{0, 0, 0},
{0, 3, 0},
{0, 0, 0}
}
local arr6 = {
{0, 0, 0},
{0, 2, 1},
{0, 0, 0}
}
local arr7 = {
{0, 0, 0},
{0, 2, 0},
{1, 0, 0}
}
local arr8 = {
{0, 0, 0},
{0, 2, 0},
{0, 1, 0}
}
local arr9 = {
{0, 0, 0},
{0, 2, 0},
{0, 0, 1}
}
local arr10 = {
{1, 1, 1},
{1, 3, 1},
{1, 1, 1}
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
local area5 = createCombatArea(arr5)
local area6 = createCombatArea(arr6)
local area7 = createCombatArea(arr7)
local area8 = createCombatArea(arr8)
local area9 = createCombatArea(arr9)
local area10 = createCombatArea(arr10)

setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
setCombatArea(combat4, area4)
setCombatArea(combat5, area5)
setCombatArea(combat6, area6)
setCombatArea(combat7, area7)
setCombatArea(combat8, area8)
setCombatArea(combat9, area9)
setCombatArea(combat10, area10)

local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end

local function onCastSpell2(parameters)
doCombat(parameters.cid, parameters.combat2, parameters.var)
end

local function onCastSpell3(parameters)
doCombat(parameters.cid, parameters.combat3, parameters.var)
end

local function onCastSpell4(parameters)
doCombat(parameters.cid, parameters.combat4, parameters.var)
end

local function onCastSpell5(parameters)
doCombat(parameters.cid, parameters.combat5, parameters.var)
end

local function onCastSpell6(parameters)
doCombat(parameters.cid, parameters.combat6, parameters.var)
end

local function onCastSpell7(parameters)
doCombat(parameters.cid, parameters.combat7, parameters.var)
end

local function onCastSpell8(parameters)
doCombat(parameters.cid, parameters.combat8, parameters.var)
end

local function onCastSpell9(parameters)
doCombat(parameters.cid, parameters.combat9, parameters.var)
end

local function onCastSpell10(parameters)
doCombat(parameters.cid, parameters.combat10, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var,combat1 = combat1,combat2 = combat2,combat3 = combat3,combat4 = combat4,combat5 = combat5,combat6 = combat6,combat7 = combat7,combat8 = combat8,combat9 = combat9,combat10 = combat10 }

addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 100, parameters)
addEvent(onCastSpell3, 100, parameters)
addEvent(onCastSpell4, 100, parameters)
addEvent(onCastSpell5, 100, parameters)
addEvent(onCastSpell6, 100, parameters)
addEvent(onCastSpell7, 100, parameters)
addEvent(onCastSpell8, 100, parameters)
addEvent(onCastSpell9, 100, parameters)
addEvent(onCastSpell10, 100, parameters)

end

 

PS: Essa script n esta dando os erros que citei acima.

 

ALGUEM AJUDA PORFAVOR, VALENDO +REP

Link para o comentário
Compartilhar em outros sites

  • 0

e.e Tenta ai

local condition = createConditionObject(CONDITION_PARALYZE)
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_CREATEITEM, 9612)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_CREATEITEM, 9611)
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_CREATEITEM, 9619)
local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_CREATEITEM, 9618)
local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_CREATEITEM, 9617)
local combat6 = createCombatObject()
setCombatParam(combat6, COMBAT_PARAM_CREATEITEM, 9616)
local combat7 = createCombatObject()
setCombatParam(combat7, COMBAT_PARAM_CREATEITEM, 9615)
local combat8 = createCombatObject()
setCombatParam(combat8, COMBAT_PARAM_CREATEITEM, 9614)
local combat9 = createCombatObject()
setCombatParam(combat9, COMBAT_PARAM_CREATEITEM, 9613)
local combat9 = createCombatObject()
setCombatParam(combat9, COMBAT_PARAM_CREATEITEM, 9613)
local combat10 = createCombatObject()
setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setAttackFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, 1, 1, 3, 4)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(condition, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition)
local arr1 = {
{1, 0, 0},
{0, 2, 0},
{0, 0, 0}
}
local arr2 = {
{0, 1, 0},
{0, 2, 0},
{0, 0, 0}
}
local arr3 = {
{0, 0, 1},
{0, 2, 0},
{0, 0, 0}
}
local arr4 = {
{0, 0, 0},
{1, 2, 0},
{0, 0, 0}
}
local arr5 = {
{0, 0, 0},
{0, 3, 0},
{0, 0, 0}
}
local arr6 = {
{0, 0, 0},
{0, 2, 1},
{0, 0, 0}
}
local arr7 = {
{0, 0, 0},
{0, 2, 0},
{1, 0, 0}
}
local arr8 = {
{0, 0, 0},
{0, 2, 0},
{0, 1, 0}
}
local arr9 = {
{0, 0, 0},
{0, 2, 0},
{0, 0, 1}
}
local arr10 = {
{1, 1, 1},
{1, 3, 1},
{1, 1, 1}
}
local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
local area5 = createCombatArea(arr5)
local area6 = createCombatArea(arr6)
local area7 = createCombatArea(arr7)
local area8 = createCombatArea(arr8)
local area9 = createCombatArea(arr9)
local area10 = createCombatArea(arr10)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
setCombatArea(combat4, area4)
setCombatArea(combat5, area5)
setCombatArea(combat6, area6)
setCombatArea(combat7, area7)
setCombatArea(combat8, area8)
setCombatArea(combat9, area9)
setCombatArea(combat10, area10)
local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, parameters.combat2, parameters.var)
end
local function onCastSpell3(parameters)
doCombat(parameters.cid, parameters.combat3, parameters.var)
end
local function onCastSpell4(parameters)
doCombat(parameters.cid, parameters.combat4, parameters.var)
end
local function onCastSpell5(parameters)
doCombat(parameters.cid, parameters.combat5, parameters.var)
end
local function onCastSpell6(parameters)
doCombat(parameters.cid, parameters.combat6, parameters.var)
end
local function onCastSpell7(parameters)
doCombat(parameters.cid, parameters.combat7, parameters.var)
end
local function onCastSpell8(parameters)
doCombat(parameters.cid, parameters.combat8, parameters.var)
end
local function onCastSpell9(parameters)
doCombat(parameters.cid, parameters.combat9, parameters.var)
end
local function onCastSpell10(parameters)
doCombat(parameters.cid, parameters.combat10, parameters.var)
end
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var,combat1 = combat1,combat2 = combat2,combat3 = combat3,combat4 = combat4,combat5 = combat5,combat6 = combat6,combat7 = combat7,combat8 = combat8,combat9 = combat9,combat10 = combat10 }
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 100, parameters)
addEvent(onCastSpell3, 100, parameters)
addEvent(onCastSpell4, 100, parameters)
addEvent(onCastSpell5, 100, parameters)
addEvent(onCastSpell6, 100, parameters)
addEvent(onCastSpell7, 100, parameters)
addEvent(onCastSpell8, 100, parameters)
addEvent(onCastSpell9, 100, parameters)
addEvent(onCastSpell10, 100, parameters)
end

Link para o comentário
Compartilhar em outros sites

  • 0

Mano deu os seguintes erros:

 

Ele hita o inimigo só uma vez, e n fica hitando ele direto durante 5 segundos, e tbm n paraliza o player nem o inimigo.

 

ALGUEM AJUDA PORFAVOR, VALENDO +REP

Link para o comentário
Compartilhar em outros sites

  • 0

O hit por 5 segundos n sei o q fazer man pois pensei q tua spells já estivesse fazendo isso...nem li ela para ser sincero...

Agora paraliza eu fiz o bang certo pelo q eu saiba X=

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...