From ec21266463e6b1a2ef76bb4d99903cfebabacdd9 Mon Sep 17 00:00:00 2001
From: Jesusaves <cpntb1@ymail.com>
Date: Mon, 18 May 2020 08:18:36 -0300
Subject: Fix Kamelot Event. Also, a good news: Catch the Golden Fish core
 worked! \o/ PS. Don't do server restarts at Mondays. Well, you can. But
 previous Aurora Event will be dismissed.

---
 npc/014-4/kamelot.txt    | 11 ++++++-----
 npc/functions/aurora.txt |  9 +++++++--
 2 files changed, 13 insertions(+), 7 deletions(-)

(limited to 'npc')

diff --git a/npc/014-4/kamelot.txt b/npc/014-4/kamelot.txt
index 760b609a8..090ad6501 100644
--- a/npc/014-4/kamelot.txt
+++ b/npc/014-4/kamelot.txt
@@ -61,16 +61,17 @@ OnTouch:
         end;
     }
 
-    // Aurora Event Framework Handler
-    if ($EVENT$ == "Kamelot") {
-        FYE_Kamelot();
-    }
-
     // Save your GID for reference
     .@g=getcharid(2);
 
     // Quest already started
     if ($KAMELOT_QUEST[.@g] & 1) {
+
+        // Aurora Event Framework Handler
+        if ($EVENT$ == "Kamelot") {
+            FYE_Kamelot();
+        }
+
         // Quest started but Cooldown expired
         // Needs to cleanup - wipe all variables
         if ($KAMELOT_COOLDOWN[.@g] < gettimeparam(GETTIME_WEEKDAY)) {
diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt
index 275bbc8dd..1e100f3cd 100644
--- a/npc/functions/aurora.txt
+++ b/npc/functions/aurora.txt
@@ -147,7 +147,11 @@ function	script	FYE_Kamelot	{
         }
         mesc l("Should we?");
         next;
-        if (askyesno() == ASK_NO)
+        askyesno();
+        closeclientdialog();
+
+        // Not going? Spoilsport
+        if (@menu == ASK_NO)
             return false;
 
         // Someone began while you waited
@@ -155,11 +159,12 @@ function	script	FYE_Kamelot	{
             return true;
 
         // Begin
-        callfunc("KamelotCleanup", .@g);
+        //callfunc("KamelotCleanup", .@g); // Not needed
         $KAMELOT_COOLDOWN[.@g] = 0;
         $@FYE_KAMELOT[.@g] = gettimeparam(GETTIME_DAYOFMONTH);
         mesc l("Have fun!");
         next;
+        closeclientdialog();
         return true;
     }
     return false;
-- 
cgit v1.2.3-70-g09d2