
Nome: Soul Gain
Função: Toda vez que o player dá use em um vampire lord token (), ele ganha 10 de soul.
- soulGain.lua
function onUse(cid, item) if getPlayerPromotionLevel(cid) < 5 then if getPlayerSoul(cid)==100 then doPlayerSendCancel(cid, "Seu soul já está no máximo.") return true end if getPlayerSoul(cid) < 90 then doPlayerAddSoul(cid, 10) doSendMagicEffect(getCreaturePosition(cid), 17) doPlayerRemoveItem(cid, 9020, 1) else local taxa = 100 - getPlayerSoul(cid) doPlayerAddSoul(cid, taxa) doSendMagicEffect(getCreaturePosition(cid), 17) doPlayerRemoveItem(cid, 9020, 1) end end if getPlayerPromotionLevel(cid) > 4 then if getPlayerSoul(cid)==200 then doPlayerSendCancel(cid, "Seu soul já está no máximo.") return true end if getPlayerSoul(cid) < 190 then doPlayerAddSoul(cid, 10) doSendMagicEffect(getCreaturePosition(cid), 17) doPlayerRemoveItem(cid, 9020, 1) else taxa = (getPlayerSoul(cid) - 200) * (-1) doPlayerAddSoul(cid, taxa) doSendMagicEffect(getCreaturePosition(cid), 17) doPlayerRemoveItem(cid, 9020, 1) end end end
- No actions.xml coloque:
<action itemid="9020" event="script" value="soulGain.lua"/>>