Joe Rod
Discord: joerod1
Hi all, this is a support spell for sorc/druids that it gives a certain percent of total mana if it's sacrificed a certain percent of your total hp, the player who cast this spell can get max 50% of his/her total mana and sometimes can die because it removes 50~100% of total hp. As you can see is a double-edged sword, it could save the life or finish it.
I hope you like it, it was a random idea
Regards
Lua:
function onCastSpell(cid, var)
local num = math.random(50)
local pos = getThingPos(cid)
local health = math.floor(getCreatureMaxHealth(cid)*((num*2)/100))
local mana = math.floor(getCreatureMaxMana(cid)*((num)/100))
if (health >= getCreatureHealth(cid)) then
doSendAnimatedText(pos, "FAIL!", 215)
else
doSendAnimatedText(pos, "+"..num .."%", COLOR_LIGHTGREEN)
doPlayerSendTextMessage(cid, 27, "You have won "..mana.." mana points, by sacrifice of "..health.." points." )
end
doSendMagicEffect(pos, 12)
doCreatureAddHealth(cid, -health)
doCreatureAddMana(cid, mana)
return true
end
XML:
<instant name="Intense Mana Recover" words="erac tnodi" lvl="20" mana="70" aggressive="1" selftarget="1" exhaustion="10000" needlearn="0" event="script" value="support/idontcare.lua">
<vocation id="1;5"/>
<vocation id="2;6"/>
</instant>
I hope you like it, it was a random idea
Regards