summaryrefslogtreecommitdiff
path: root/npc/functions/vault.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-11-26 16:55:01 -0300
committerJesusaves <cpntb1@ymail.com>2022-11-26 16:55:01 -0300
commitc50dbd8d3b50a90fa4530e5e9a8dfc2d02b5f5ac (patch)
treed87b6fed852aa631394539f0c3d09a302d056059 /npc/functions/vault.txt
parentde46dd6ce18a29877e6ffc331389605d3af2919e (diff)
downloadserverdata-c50dbd8d3b50a90fa4530e5e9a8dfc2d02b5f5ac.tar.gz
serverdata-c50dbd8d3b50a90fa4530e5e9a8dfc2d02b5f5ac.tar.bz2
serverdata-c50dbd8d3b50a90fa4530e5e9a8dfc2d02b5f5ac.tar.xz
serverdata-c50dbd8d3b50a90fa4530e5e9a8dfc2d02b5f5ac.zip
Refactor #ADD_LVL
Diffstat (limited to 'npc/functions/vault.txt')
-rw-r--r--npc/functions/vault.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/npc/functions/vault.txt b/npc/functions/vault.txt
index 78eb5e7db..b66d46ff0 100644
--- a/npc/functions/vault.txt
+++ b/npc/functions/vault.txt
@@ -39,3 +39,31 @@ function script MirrorLakeSendTo {
end;
}
+
+// BonusEXP({mobId})
+function script BonusEXP {
+ // Only applies if you are not in TOP 3
+ if (BaseLevel >= TOP3AVERAGELVL())
+ return;
+
+ // Permanent Level Boost
+ if (#ADD_LVL) {
+ .@mobId=getarg(0, killedrid);
+ .@exp = min(#ADD_LVL, getmonsterinfo(.@mobId, MOB_BASEEXP) * 2);
+ getexp .@exp, 0;
+ #ADD_LVL-=.@exp;
+
+ /*
+ if ((readparam(BaseExp)+.@exp > readparam(NextBaseExp))) {
+ do {
+ if (BaseLevel >= TOP3AVERAGELVL()) break; // Boundaries
+ .@v=readparam(NextBaseExp)-readparam(BaseExp);
+ getexp .@v, 0;
+ #ADD_LVL-=.@v;
+ } while (readparam(BaseExp)+.@exp > readparam(NextBaseExp));
+ }
+ */
+ }
+ return;
+}
+