From 80398e0fb1fa50e52c99b34b284e0a4d88c33d72 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 3 Nov 2020 11:18:48 -0300 Subject: Ensure Aurora Event will be cleaned up properly before switching annual event --- npc/functions/event.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/npc/functions/event.txt b/npc/functions/event.txt index 1de8d7ef0..7abc2eb35 100644 --- a/npc/functions/event.txt +++ b/npc/functions/event.txt @@ -403,6 +403,8 @@ OnClock0000: // Begin the event if (.@d == .valentine_stday) { kamibroadcast("Valentine Day begun!"); + if ($EVENT$ != "") + FYStopEvent(); $EVENT$="Valentine"; $@VALENTINE_LOVELETTER = htnew(); $@VALENTINE_GIFTSTACKS = htnew(); @@ -459,6 +461,8 @@ OnClock0000: // Begin the event else if (.@d == .patrick_stday) { kamibroadcast("St. Patrick Day begun!"); + if ($EVENT$ != "") + FYStopEvent(); $EVENT$="Patrick"; $@PATRICK_DAYMAX=.patrick_endday; enablenpc "sPatrick"; @@ -489,6 +493,8 @@ OnClock0000: // Begin the event else if (.@d == .easter_stday && .@m == .easter_stmon) { kamibroadcast("Easter begun!"); + if ($EVENT$ != "") + FYStopEvent(); $EVENT$="Easter"; } // End the event the day after @@ -513,6 +519,8 @@ OnClock0000: // Begin the event else if (.@d == .worker_stday && .@m == .worker_stmon) { kamibroadcast("Worker Day begun!"); + if ($EVENT$ != "") + FYStopEvent(); $EVENT$="Worker"; } // End the event the day after @@ -537,6 +545,8 @@ OnClock0000: // Begin the event else if (.@d == .thanks_stday && .@m == .thanks_stmon) { kamibroadcast("Thanksgiving begun!"); + if ($EVENT$ != "") + FYStopEvent(); $EVENT$="Thanksgiving"; } // End the event the day after @@ -561,6 +571,8 @@ OnClock0000: // Begin the event else if (.@d == .xmas_stday && .@m == .xmas_stmon) { kamibroadcast("Christmas begun!"); + if ($EVENT$ != "") + FYStopEvent(); $EVENT$="Christmas"; query_sql("DELETE FROM `quest` WHERE `quest_id` = '"+SQuest_Christmas+"'"); sChristmas(); -- cgit v1.2.3-60-g2f50