diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-11-26 16:55:01 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-11-26 16:55:01 -0300 |
commit | c50dbd8d3b50a90fa4530e5e9a8dfc2d02b5f5ac (patch) | |
tree | d87b6fed852aa631394539f0c3d09a302d056059 /npc/functions/vault.txt | |
parent | de46dd6ce18a29877e6ffc331389605d3af2919e (diff) | |
download | serverdata-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.txt | 28 |
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; +} + |