Hello there, hope yours fine!
Well, i got a spell which i need help to fix it.
What's the spell?
The spell is called AUTO-HEAL, yeah i made somethings by my own, and mixing somes scripts, from here and otfans.
What are these spells?
AUTO-HEAL from otfans and Health Area from here at Spells & CreatureEvents.
What i want/What's the problem?
The problem is, if the player cast this spell 5x times, it will be healing 5x you for a certain time, All i need is if the player cast the spell, he must wait until to cast again or if he cast the spell, and cast again, and keep casting, it will be healing like the player casted 1 time only.
Here go the script:
Well if you could help me, i'll be adding REP for you as fast i can!
sorry for my bad english, that's not my job
Well, i got a spell which i need help to fix it.
What's the spell?
The spell is called AUTO-HEAL, yeah i made somethings by my own, and mixing somes scripts, from here and otfans.
What are these spells?
AUTO-HEAL from otfans and Health Area from here at Spells & CreatureEvents.
What i want/What's the problem?
The problem is, if the player cast this spell 5x times, it will be healing 5x you for a certain time, All i need is if the player cast the spell, he must wait until to cast again or if he cast the spell, and cast again, and keep casting, it will be healing like the player casted 1 time only.
Here go the script:
--> CONFIG SPELL <--
local HEAL_DELAY = 3000
local HEAL_TIMES = 10
--> CONFIG SPELL <--
function onCastSpell(cid, var)
local function onCastSpell(parameters)
doCreatureAddHealth(cid, 20)
doSendMagicEffect(getPlayerPosition(cid), 14)
end
local parameters = {cid = cid, combat = combat, var = var}
for i = 0, math.max(HEAL_TIMES, 1) - 1 do
addEvent(onCastSpell, HEAL_DELAY * i, parameters)
end
return LUA_NO_ERROR
end
Well if you could help me, i'll be adding REP for you as fast i can!
sorry for my bad english, that's not my job
Last edited: