summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIbrahem Zidan <brahem@aotsw.com>2019-04-28 21:29:47 +0200
committerGitHub <noreply@github.com>2019-04-28 21:29:47 +0200
commitc972b89f82015d2efa7724e3acd4480245b74f56 (patch)
tree4b1eee0810a59a68abee0fa917f80d0b7b3efb7e
parent629f733b6feed7c702e2e78f3fdbbbdc9045ceb8 (diff)
parent82173b60e2d00d018f39514ae02089b76ed84705 (diff)
downloadhercules-c972b89f82015d2efa7724e3acd4480245b74f56.tar.gz
hercules-c972b89f82015d2efa7724e3acd4480245b74f56.tar.bz2
hercules-c972b89f82015d2efa7724e3acd4480245b74f56.tar.xz
hercules-c972b89f82015d2efa7724e3acd4480245b74f56.zip
Merge pull request #2442 from Emistry/script_issue_1955
Fix issue #1955
-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;
}