diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-06-23 01:09:30 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-06-23 01:09:30 -0300 |
commit | c287943f22b294bb074411ae3e3d04ce02726841 (patch) | |
tree | 8c93db35addd1761a24e92a7a7be9131c3f27379 /npc/functions/mobpoint.txt | |
parent | 9701df54795ff74f23391a259edb29196d0fbd4f (diff) | |
download | serverdata-c287943f22b294bb074411ae3e3d04ce02726841.tar.gz serverdata-c287943f22b294bb074411ae3e3d04ce02726841.tar.bz2 serverdata-c287943f22b294bb074411ae3e3d04ce02726841.tar.xz serverdata-c287943f22b294bb074411ae3e3d04ce02726841.zip |
Fix a few tiny bugs
Diffstat (limited to 'npc/functions/mobpoint.txt')
-rw-r--r-- | npc/functions/mobpoint.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt index b069dbe27..49d742298 100644 --- a/npc/functions/mobpoint.txt +++ b/npc/functions/mobpoint.txt @@ -13,7 +13,8 @@ function script fix_mobkill { function script mobpoint { if (!MPQUEST) return; - //if (killedrid < 1002) goto L_Return; + if (!killedrid) // A bug! + return; .@moblv=strmobinfo(3,killedrid); // You get MobLv + 20% as MobPoints. @@ -62,6 +63,10 @@ OnNPCKillEvent: JobExp-=1; } + // killedrid was not set, so we skip + if (!killedrid) + return; + // call functions callfunc "mobpoint"; callfunc "mobhunter"; @@ -71,6 +76,8 @@ OnNPCKillEvent: callfunc "Guardhouse_RandQuestCheck"; callfunc "AuroraMobkill"; + // Unset killedrid. This affects multiple calls of this function + // But it is in overall more reliable imao killedrid=0; end; |