hello! searching in this forum i found a nice exhaust script!, but i got one problem with it, when i'm "exhausted" and i cast the spell it continues removing me mana, and i want delete that because a exevo gran mas vis removes me 700 mana and if i want check my exhausted i need waste that amount of mana... I might that you will understand...
Server: Avesta 7.6
Script: Light healing (exura)
All works fine, but when i'm exhausted it continues wasting me mana...
Server: Avesta 7.6
Script: Light healing (exura)
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
function onGetFormulaValues(cid, level, maglevel)
min = (level * 2 + maglevel * 3) * 0.10
max = (level * 2 + maglevel * 3) * 0.35
if min < 15 then
min = 15
end
return min, max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
if exhaustion.check(cid, 18000) == 0 then
exhaustion.set(cid, 18000, 100)
return doCombat(cid, combat, var)
else
doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, 18000).."]")
end
end
All works fine, but when i'm exhausted it continues wasting me mana...