summaryrefslogtreecommitdiff
path: root/npc/custom
diff options
context:
space:
mode:
authorEmistry Haoyan <equinox1991@gmail.com>2019-04-14 21:10:43 +0800
committerEmistry Haoyan <equinox1991@gmail.com>2019-04-29 00:33:24 +0800
commit82173b60e2d00d018f39514ae02089b76ed84705 (patch)
treecfb09fb4669e4528ffd90f3971ebca024ea37880 /npc/custom
parentab81d4012eac5c2c00c485971fc9b89bf69761be (diff)
downloadhercules-82173b60e2d00d018f39514ae02089b76ed84705.tar.gz
hercules-82173b60e2d00d018f39514ae02089b76ed84705.tar.bz2
hercules-82173b60e2d00d018f39514ae02089b76ed84705.tar.xz
hercules-82173b60e2d00d018f39514ae02089b76ed84705.zip
Fix issue #1955
- fix error due to event terminated by GM using `@killmonster` command.
Diffstat (limited to 'npc/custom')
-rw-r--r--npc/custom/events/mushroom_event.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/npc/custom/events/mushroom_event.txt b/npc/custom/events/mushroom_event.txt
index b9c54c09e..b04b99fff 100644
--- a/npc/custom/events/mushroom_event.txt
+++ b/npc/custom/events/mushroom_event.txt
@@ -50,9 +50,12 @@ OnMinute10: // Start time (every hour)
OnMobKilled:
set .Spawn, .Spawn - 1;
- getitem .Prize, .Amount;
- if (.Spawn) announce "[ "+strcharinfo(PC_NAME)+" ] has killed a Mushroom. There are now "+.Spawn+" Mushroom(s) left.",bc_map;
- else {
+ if (playerattached() != 0) {
+ getitem .Prize, .Amount;
+ if (.Spawn)
+ announce "[ "+strcharinfo(PC_NAME)+" ] has killed a Mushroom. There are now "+.Spawn+" Mushroom(s) left.",bc_map;
+ }
+ if (!.Spawn) {
announce "The Find the Mushroom Event has ended. All the Mushrooms have been killed.",0;
set .status,0;
}