V
varhlak
Guest
Hey, i am trying to make an statue/item/ whatever, so when you use it, it 'resets' your level to 50, changes your exp to listed below and gives you x Hp/mana and current vocation. Although it's somehow not working. Can somebody help me with the script?
I have no idea why it doesnt do what it is indicated to - mainly, the problem is - however i use it, it just shows me i have to be level 500,000 - though im 504k . Also - so people don't troll me, theres my actions.xml file :
Thanks and hoping for somebody to assist me.
Lua:
function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) < 500000 then
doPlayerAddExp(cid,-9000000000000000000000)
doPlayerAddExp(cid,1846450)
doPlayerSetVocation(cid,50)
doPlayerAddHealth(cid,269)
doPlayerAddMana(cid,119)
doPlayerSendTextMessage(cid,1,"Your soul has been sacrificed. You are now a Demonhunter.")
else
doPlayerSendTextMessage(cid,1,"Sorry, you have to be at least level 500,000 to sacrifice your soul.")
end
end
Lua:
<actions>
<!-- Demonhunter / powers -->
<action actionid="8955" script="demonhunter.lua" />
Thanks and hoping for somebody to assist me.