Okay so TFS 1.0 is still 'missing' a bunch of 'nice' functions that 0.3/4 had (I think?)
What I need to do is get a script working to stop people from falling below a set level.
For example, a character that dies at level 8 would log in as level 7, but then be immediately given level 8 again (with 100% till next level)
This was easy to do on 0.3/4 using the following script:
I've had a look around, but I couldn't find a way to achieve this in 1.0 yet.
If anyone can think of another way to achieve what I want it would be greatly appreciated =]
Thanks,
Michael
What I need to do is get a script working to stop people from falling below a set level.
For example, a character that dies at level 8 would log in as level 7, but then be immediately given level 8 again (with 100% till next level)
This was easy to do on 0.3/4 using the following script:
Code:
function onLogin(cid)
local minimumLevel = 8
if getPlayerLevel(cid) < minimumLevel then
doPlayerAddExperience(cid, (getExperienceForLevel(minimumLevel) - getPlayerExperience(cid)))
end
return TRUE
end
I've had a look around, but I couldn't find a way to achieve this in 1.0 yet.
If anyone can think of another way to achieve what I want it would be greatly appreciated =]
Thanks,
Michael