summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-07-23 19:42:34 -0300
committerJesusaves <cpntb1@ymail.com>2018-07-23 19:42:34 -0300
commita7ad6a99f24c1701dcd9085b623716bed62bcedf (patch)
tree5204598e6229673da9ceedc8dec908e378811440 /npc
parente45a77cbaf4db770a5cc11eee883c3e4297acc77 (diff)
downloadserverdata-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')
-rw-r--r--npc/functions/clientversion.txt5
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.