PHP:
function onCastSpell(cid, var)
local dif = getPlayerMaxHealth(cid) - getPlayerHealth(cid)
if getPlayerHealth(cid) ~= getPlayerMaxHealth(cid) then
min = (getPlayerLevel(cid) * 2 + getPlayerMagLevel(cid) * 3) * 0.5 - 30
max = (getPlayerLevel(cid) * 2 + getPlayerMagLevel(cid) * 3) * 0.6
healing = math.random(min, max)
if healing > dif then
healing = dif
end
doPlayerAddHealth(cid, healing)
doSendMagicEffect(getPlayerPosition(cid), 12)
doSendAnimatedText(getPlayerPosition(cid), healing, 30)
doRemoveCondition(cid, CONDITION_PARALYZE)
else
doSendMagicEffect(getPlayerPosition(cid), 12)
doRemoveCondition(cid, CONDITION_PARALYZE)
end
end
---By Nahruto
-This is the Light healing, but you can take this base, to the others healing spells.
-If you have not the function
Code:
doRemoveCondition