roriscrave
Advanced OT User
- Joined
- Dec 7, 2011
- Messages
- 1,188
- Solutions
- 34
- Reaction score
- 200
How i can put this spell for repeat?
i want to repeat this function 3x, how can i make it? For when the player uses the jutsu, show the effect 3 times
i want to repeat this function 3x, how can i make it? For when the player uses the jutsu, show the effect 3 times
Lua:
addEvent(function()
position:sendSpellEffect(798)
end, math.ceil(100 * (getDistanceBetween(creature_pos, position))))
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
combat:setFormula(COMBAT_FORMULA_LEVELMAGIC, -161.2, 1, -163.2, 1) -- level 420 free
combat:setArea(createCombatArea(AREA_RECTANGLE7X5))
function onTargetTile(creature, position)
local creature_pos = creature:getPosition()
if creature_pos ~= position then
addEvent(function()
position:sendSpellEffect(798)
end, math.ceil(100 * (getDistanceBetween(creature_pos, position))))
end
end
combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(creature, variant)
return combat:execute(creature, variant)
end