Lua:
local timer = 250
local combat, area = {}, {
{
{0,0,0},
{0,0,0},
{0,0,0},
{1,3,1},
{1,0,1}
},
{
{0,0,0},
{0,0,0},
{0,0,0},
{1,1,1},
{0,2,0}
},
{
{0,0,0},
{0,0,0},
{1,1,1},
{0,0,0},
{0,2,0}
},
{
{0,0,0},
{1,1,1},
{0,0,0},
{0,0,0},
{0,2,0}
},
{
{1,1,1},
{0,0,0},
{0,0,0},
{0,0,0},
{0,2,0}
}
}
for i = 1, #area do
combat[i] = createCombatObject()
setCombatParam(combat[i], COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat[i], COMBAT_PARAM_EFFECT, 6)
setCombatArea(combat[i], createCombatArea(area[i]))
function onGetFormulaValues(cid, level, maglevel)
min = -((level / 5) + (maglevel * 10) + 25)
max = -((level / 5) + (maglevel * 20) + 50)
return min, max
end
setCombatCallback(combat[i], CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
end
function onCastSpell(cid, var)
doCombat(cid, combat[1], var)
addEvent(doCombat, 250, cid, combat[2], var)
addEvent(doCombat, 500, cid, combat[3], var)
addEvent(doCombat, 750, cid, combat[4], var)
addEvent(doCombat, 1000, cid, combat[5], var)
return true
end
XML:
<instant group="attack" name="test" words="test" lvl="0" mana="0" prem="0" direction="1" blockwalls="1" exhaustion="2000" groupcooldown="1000" needlearn="0" script="test.lua">
<vocation name="Master Sorcerer"/>
</instant>
When the player is standing still, the spell executes just fine.
But if you execute spell and then move south, rest of the spell will execute on the top so the location effect is opposite
I am using tfs 1.0, if you know how to fix it plz tell me