diff options
Diffstat (limited to 'npc/014-4/kamelot.txt')
-rw-r--r-- | npc/014-4/kamelot.txt | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/npc/014-4/kamelot.txt b/npc/014-4/kamelot.txt index b95d4b720..401d8532c 100644 --- a/npc/014-4/kamelot.txt +++ b/npc/014-4/kamelot.txt @@ -26,6 +26,15 @@ // $KAMELOT_KEYMASK [ guild_id ] = Which bit was assigned as the key // $KAMELOT_COOLDOWN [ guild_id ] = Last attempt (weekly attempts) +// KamelotCleanup(guildid) +function script KamelotCleanup { + .@g=getarg(0); + //$KAMELOT_ID[.@g]=0; + $KAMELOT_QUEST[.@g]=0; + $KAMELOT_KEYMASK[.@g]=0; + return; +} + 014-4,67,26,0 script #KamelotEnter NPC_HIDDEN,0,0,{ end; @@ -43,13 +52,16 @@ OnTouch: // Save your GID for reference .@g=getcharid(2); - // TODO: Quest started, Cooldown expired - // Needs to cleanup - wipe all variables - // Quest already started if ($KAMELOT_QUEST[.@g] & 1) { - dispbottom l("The gates are firmly shut by some weird magical power."); - end; + // Quest started but Cooldown expired + // Needs to cleanup - wipe all variables + if ($KAMELOT_COOLDOWN[.@g] < gettimeparam(GETTIME_WEEKDAY)) { + KamelotCleanup(); + } else { + dispbottom l("The gates are firmly shut by some weird magical power."); + end; + } } // Build instance if it doesn't exists or has been reallocated |