summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-07-29 14:26:57 -0300
committerJesusaves <cpntb1@ymail.com>2018-07-29 14:26:57 -0300
commit76939330e98f30b52530bef2cd77228169a60936 (patch)
treece1086c045bc2bed32001d0768683fc05c1dc689 /npc
parente50b461dba004b4180bd53fa70f5313a3425bb60 (diff)
downloadserverdata-76939330e98f30b52530bef2cd77228169a60936.tar.gz
serverdata-76939330e98f30b52530bef2cd77228169a60936.tar.bz2
serverdata-76939330e98f30b52530bef2cd77228169a60936.tar.xz
serverdata-76939330e98f30b52530bef2cd77228169a60936.zip
Count time flasks too. There are other bugs, beware. Missing max() on time flask too
Diffstat (limited to 'npc')
-rw-r--r--npc/functions/clientversion.txt12
-rw-r--r--npc/items/teleporter.txt4
2 files changed, 9 insertions, 7 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.
diff --git a/npc/items/teleporter.txt b/npc/items/teleporter.txt
index 64adb4120..f88540ad2 100644
--- a/npc/items/teleporter.txt
+++ b/npc/items/teleporter.txt
@@ -33,7 +33,7 @@ OnUse:
mesc l("PS. Additional reagents may be required for warps.");
next;
- .@x=reputation("Hurns");
+ .@x=reputation("Hurns")+countitem(TimeFlask)-1;
menu
l("Don't warp"), -,
@@ -59,7 +59,7 @@ L_LoF:
} else {
doevent "shake::OnGM";
warp "017-1", 120, 89;
- TELEPORTER_TIME=gettimetick(2)+(60*30)-(.@x*60);
+ TELEPORTER_TIME=gettimetick(2)+(60*50)-(.@x*60);
}
closedialog;
end;