diff options
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; +} + |