Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cooldown = 70004
- local cooldown_s = 3
- local combat = createCombatObject()
- setCombatParam(combat, COMBAT_PARAM_EFFECT, 46)
- setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
- local function selfRegeneration(cid, n)
- if not isCreature(cid) or n <= 0 then
- return true
- end
- doTargetCombatHealth(cid, cid, COMBAT_HEALING, (getCreatureMaxHealth(cid) * 0.40), (getCreatureMaxHealth(cid) * 0.40), 46)
- addEvent(selfRegeneration, 1000, cid, n - 1)
- end
- function onCastSpell(cid, var)
- if exhaustion.check(cid, cooldown) == false then
- exhaustion.set(cid, cooldown, cooldown_s)
- selfRegeneration(cid, 2)
- doCombat(cid, combat, var)
- else
- if isPlayer(cid) then
- doPlayerSendCancel(cid, "Wait: [" ..tostring(exhaustion.get(cid, cooldown)).."]")
- doSendMagicEffect(getCreaturePosition(cid), 2)
- end
- return false
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement