0.4
Hello guys, Im having a little problem here. I was trying to do a double exori, when the player uses the exori, it hits once, and them after 2sec, hits again
But, if the player moves, the exori will not follow him and it will happen in the spot of the first exori
I just want it to 'follow' the player, if he walks, happening where he is.
Hello guys, Im having a little problem here. I was trying to do a double exori, when the player uses the exori, it hits once, and them after 2sec, hits again
But, if the player moves, the exori will not follow him and it will happen in the spot of the first exori
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)
local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)
function onGetFormulaValues(cid, level, skill, attack, factor)
local skillTotal, levelTotal = skill + attack, level / 5
return -(skillTotal * 0.9 + levelTotal), -(skillTotal * 1.9 + levelTotal)
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
for i = 0, 2000, 2000 do
addEvent(function(cid)
if not isPlayer(cid) then
return
end
return doCombat(cid, combat, var)
end, i, cid)
end
end
I just want it to 'follow' the player, if he walks, happening where he is.