I need a script that makes the killed characters go back to lvl 50 after theyve died.
This is what I have, they do not work:
Help would me MUCH appreciated.
Thanks in advance.
SOLVED by Ond.
This is what I have, they do not work:
creaturescripts.xml
Code:
<?xml version="1.0"?>
<creaturescripts>
<event type="login" name="login" event="script" value="login.lua"/>
<event type="login" name="lvl" event="script" value="lvl.lua"/>
</creaturescripts>
lvl.lua
Code:
function onLogin(cid)
if getPlayerLevel(cid) < 50 then
doPlayerAddExp(cid, (getExpForLevel(50) - getPlayerExp(cid)))
end
return TRUE
end
login.lua
Code:
function onLogin(cid)
registerCreatureEvent(cid, "lvl")
return 1
end
Help would me MUCH appreciated.
Thanks in advance.
SOLVED by Ond.
Code:
function onLogin(cid)
if getPlayerExperience(cid) < 1847300 then
doPlayerAddExp(cid, (-getPlayerExperience(cid)) + 1847300)
end
return 1
end
Last edited: