diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-07-23 19:42:34 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-07-23 19:42:34 -0300 |
commit | a7ad6a99f24c1701dcd9085b623716bed62bcedf (patch) | |
tree | 5204598e6229673da9ceedc8dec908e378811440 /npc/functions/clientversion.txt | |
parent | e45a77cbaf4db770a5cc11eee883c3e4297acc77 (diff) | |
download | serverdata-a7ad6a99f24c1701dcd9085b623716bed62bcedf.tar.gz serverdata-a7ad6a99f24c1701dcd9085b623716bed62bcedf.tar.bz2 serverdata-a7ad6a99f24c1701dcd9085b623716bed62bcedf.tar.xz serverdata-a7ad6a99f24c1701dcd9085b623716bed62bcedf.zip |
[skip ci] attempt to best performance for #ADD_LVL handler
Diffstat (limited to 'npc/functions/clientversion.txt')
-rw-r--r-- | npc/functions/clientversion.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt index c2e85c791..6638a2c9e 100644 --- a/npc/functions/clientversion.txt +++ b/npc/functions/clientversion.txt @@ -55,6 +55,11 @@ function script checkclientversion { mesc l("Anyway, ##Bwelcome##b, and have fun! If you need anything, we are a keypress from distance!"), 3; //atcommand "@blvl "+#ADD_LVL; getitem TimeFlask, 1; + 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. |