From 1bffac5523399d7c4a14484b9ebc07dfd11313fc Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 15 May 2020 18:10:20 -0300 Subject: Aurora Event Framework - Stop the previous event as well --- npc/functions/aurora.txt | 9 +++++++++ npc/functions/event.txt | 3 +++ 2 files changed, 12 insertions(+) diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt index 20d777478..af6cc7a45 100644 --- a/npc/functions/aurora.txt +++ b/npc/functions/aurora.txt @@ -96,4 +96,13 @@ function script FYE_Regnum { return; } +// Stops any Aurora Event +function script FYStopEvent { + setarray .@av$, "Kamelot", "Regnum"; + if (array_find(.@av$, $EVENT$) >= 0) { + sClear(); + $EVENT$=""; + } + return; +} diff --git a/npc/functions/event.txt b/npc/functions/event.txt index 01afec06b..89c02ee03 100644 --- a/npc/functions/event.txt +++ b/npc/functions/event.txt @@ -321,6 +321,9 @@ OnClock0000: // continue... } + // Stop previous event + FYStopEvent(); + // Trigger event framework if (.@dofy && $EVENT$ == "") FYNewEvent(); -- cgit v1.2.3-60-g2f50