diff options
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/mobpoint.txt | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt index 11bb40f57..6a6ed99ad 100644 --- a/npc/functions/mobpoint.txt +++ b/npc/functions/mobpoint.txt @@ -15,12 +15,28 @@ function script mobpoint { return; //if (killedrid < 1002) goto L_Return; + .@moblv=strmobinfo(3,killedrid); // You get MobLv + 20% as MobPoints. // So a level 100 monster gives you 120 MobPt. Slimes gives no bonus. if (compare("slime", strtolower(strmobinfo(1, killedrid)))) - .@addval=strmobinfo(3,killedrid); + .@addval=.@moblv; else - .@addval=strmobinfo(3,killedrid)*12/10; + .@addval=.@moblv*12/10; + + // Penalty/Bonus + .@base=(.@moblv-BaseLevel); + if (BaseLevel < .@moblv) { + // Target is stronger, +1% per monster level, capped at +50% + .@addval = .@addval * limit(100, 100+.@base, 150) / 100; + } else if (BaseLevel > .@moblv) { + // Target is weaker, -1% per monster level, capped at -50% + .@addval = .@addval * limit(50, 101+.@base, 100) / 100; + } + + // Sanitization + .@addval=max(0, .@addval); + + // Grant you the Monster Points Mobpt = Mobpt + .@addval; return; |