Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onCastSpell(cid, var)
- local pVoc = getPlayerVocation(cid, true) -- TEST: or FALSE
- local loseType = 1 -- 1= mana, 2 = hp
- if pVoc == 1000000 then
- loseType = 2
- end
- local spendCount = (loseType == 1 and getCreatureMana(cid) or getCreatureHealth(cid))
- if spendCount > 10 then
- doPlayerAddSpentMana(cid, spendCount)
- if loseType == 1 then
- doCreatureAddMana(cid,-spendCount)
- elseif loseType == 2 then
- doCreatureAddHealth(cid,-spendCount)
- end
- doSendMagicEffect(getPlayerPosition(cid) ,234)
- doRemoveCondition(cid, 11)
- end
- return LUA_NO_ERROR
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement