Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onCastSpell(cid)
- local formula = getPlayerLevel(cid) * getPlayerMagLevel(cid)
- local target = getCreatureTarget(cid)
- if target < 1 then
- doPlayerSendCancel(cid, "Voce precisa de um target.")
- return false
- end
- if isPlayer(target) then
- formula = formula / getPlayerLevel(target)
- else
- formula = formula / 10 -- Esta formula é de acordo com o magiclevel, quando maior o número, menor o dano!
- end
- local stealPercent = formula / 100 * 50 -- No caso a spell está configurada para curar 50%
- doCreatureAddHealth(cid, stealPercent)
- doSendAnimatedText(getThingPos(cid), "+" .. stealPercent, 25)
- doSendDistanceShoot(getThingPos(cid), getThingPos(target), 15)
- doAreaCombatHealth(cid, COMBAT_PHYSICALDAMAGE, getThingPos(target), 0, - formula, - formula * 0.5, CONST_ME_MAGIC_RED)
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement