diff options
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/clientversion.txt | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt index 3fb3bc273..9d027f326 100644 --- a/npc/functions/clientversion.txt +++ b/npc/functions/clientversion.txt @@ -56,11 +56,13 @@ function script checkclientversion { //atcommand "@blvl "+#ADD_LVL; getitem TimeFlask, 1; #ADD_LVL=(#ADD_LVL*9)/10; - do { - .@v=readparam(NextBaseExp)-readparam(BaseExp); - getexp .@v, 0; - #ADD_LVL-=.@v; - } while (readparam(BaseExp)+#ADD_LVL > readparam(NextBaseExp)); + if ((readparam(BaseExp)+#ADD_LVL > readparam(NextBaseExp))) { + do { + .@v=readparam(NextBaseExp)-readparam(BaseExp); + getexp .@v, 0; + #ADD_LVL-=.@v; + } while (readparam(BaseExp)+#ADD_LVL > readparam(NextBaseExp)); + } getexp #ADD_LVL, 0; #ADD_LVL=0; // TODO: Use @super debug functions and force player to join a guild. We will need the guild ID, though. |