Aee blz mano, vlw pegou de boinha mesmo.
Mais da uma olhada nessa spell, fico arretado quando não consigo fazer os treco direito.
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -3.9, 1, -3.9, 1)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -3.9, 1, -3.9, 1)
arr1 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}
arr2 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}
local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
local function onCastSpell1(parameters)
local position = {x=getPlayerPosition(target).x+1, y=getPlayerPosition(target).y+1, z=getPlayerPosition(target).z}
doSendMagicEffect(position, 144)
return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var)
end
local function onCastSpell2(parameters)
target = getCreatureTarget(cid)
local position = {x=getPlayerPosition(target).x+1, y=getPlayerPosition(target).y+1, z=getPlayerPosition(target).z}
doSendMagicEffect(position, 145)
return isPlayer(parameters.cid) and doCombat(parameters.cid, combat2, parameters.var)
end
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 200, parameters)
end
tag:
<instant name="Dual Tsuuga!" words="dual tsuuga" lvl="75" mana="3000" range="5" needtarget="1" blockwalls="1" exhaustion="2000" event="script" value="kiba/Dual Tsuuga.lua">
error:
[10/08/2012 22:37:30] [Error - Spell Interface]
[10/08/2012 22:37:30] In a timer event called from:
[10/08/2012 22:37:30] data/spells/scripts/kiba/Dual Tsuuga.lua:onCastSpell
[10/08/2012 22:37:30] Description:
[10/08/2012 22:37:30] (luaGetThingPosition) Thing not found
[10/08/2012 22:37:30] [Error - Spell Interface]
[10/08/2012 22:37:30] In a timer event called from:
[10/08/2012 22:37:30] data/spells/scripts/kiba/Dual Tsuuga.lua:onCastSpell
[10/08/2012 22:37:30] Description:
[10/08/2012 22:37:30] data/spells/scripts/kiba/Dual Tsuuga.lua:40: attempt to index a boolean value
[10/08/2012 22:37:30] stack traceback:
[10/08/2012 22:37:30] data/spells/scripts/kiba/Dual Tsuuga.lua:40: in function <data/spells/scripts/kiba/Dual Tsuuga.lua:39>
[10/08/2012 22:37:30] [Error - Spell Interface]
[10/08/2012 22:37:30] In a timer event called from:
[10/08/2012 22:37:30] data/spells/scripts/kiba/Dual Tsuuga.lua:onCastSpell
[10/08/2012 22:37:30] Description:
[10/08/2012 22:37:30] (luaGetCreatureTarget) Creature not found
[10/08/2012 22:37:30] [Error - Spell Interface]
[10/08/2012 22:37:30] In a timer event called from:
[10/08/2012 22:37:30] data/spells/scripts/kiba/Dual Tsuuga.lua:onCastSpell
[10/08/2012 22:37:30] Description:
[10/08/2012 22:37:30] (luaGetThingPosition) Thing not found
[10/08/2012 22:37:30] [Error - Spell Interface]
[10/08/2012 22:37:30] In a timer event called from:
[10/08/2012 22:37:30] data/spells/scripts/kiba/Dual Tsuuga.lua:onCastSpell
[10/08/2012 22:37:30] Description:
[10/08/2012 22:37:30] data/spells/scripts/kiba/Dual Tsuuga.lua:48: attempt to index a boolean value
[10/08/2012 22:37:30] stack traceback:
[10/08/2012 22:37:30] data/spells/scripts/kiba/Dual Tsuuga.lua:48: in function <data/spells/scripts/kiba/Dual Tsuuga.lua:46>





info
Grupo: Marquês
Registrado: 22/07/12
Posts: 1.1k
Reputação: +400
Gênero: Masculino
Char no Tibia: Luck Oake
Agora sim. Eu testei e tá funcionando.
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -3.9, 0, -3.9, 0)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -3.9, 0, -3.9, 0)
local arr1 = {
{0, 0, 0},
{0, 1, 0},
{0, 0, 0}
}
local arr2 = {
{1, 1, 1},
{1, 3, 1},
{1, 1, 1}
}
local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 4000)
setConditionParam(condition, CONDITION_PARAM_SPEED, -100000)
setConditionFormula(condition, -9.9, 0, -9.9, 0)
setCombatCondition(combat1, condition)
local function onCastSpell1(parameters)
return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var)
end
local function onCastSpell2(parameters)
return isPlayer(parameters.cid) and doCombat(parameters.cid, combat2, parameters.var)
end
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
target = getCreatureTarget(cid)
local position = {x=getCreaturePosition(target).x+2, y=getCreaturePosition(target).y, z=getCreaturePosition(target).z}
doSendMagicEffect(position, 116)
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 200, parameters)
return TRUE
end
Editado Agosto 10 por LuckOake