summaryrefslogtreecommitdiff
path: root/world/map/npc/functions/clear_vars.txt
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/functions/clear_vars.txt')
-rw-r--r--world/map/npc/functions/clear_vars.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/world/map/npc/functions/clear_vars.txt b/world/map/npc/functions/clear_vars.txt
index 1aa84d2b..905528ae 100644
--- a/world/map/npc/functions/clear_vars.txt
+++ b/world/map/npc/functions/clear_vars.txt
@@ -193,6 +193,7 @@ function|script|ClearVarTMW_Quest|,
if (TMW_Quest <= 10) goto L_Vincent;
if (TMW_Quest <= 12) goto L_Sandra;
if (TMW_Quest <= 40) goto L_Desert;
+ goto L_Bandit;
L_Bandit:
// move Bandit subquest into Nibble 0 of QUEST_Hurnscald
@@ -200,44 +201,59 @@ L_Bandit:
set QUEST_Hurnscald, (QUEST_Hurnscald & ~(NIBBLE_0_MASK) | (@bandit << NIBBLE_0_SHIFT));
set TMW_Quest, 40;
set @bandit, 0;
+ goto L_Desert;
+
L_Desert:
// move guard and miner subquest into Byte 2 (Nibble 4 and 5) of QUEST_SouthTulimshar
set @miners, TMW_Quest - 12;
set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@miners << BYTE_2_SHIFT));
set TMW_Quest, 12;
set @miners, 0;
+ goto L_Sandra;
+
L_Sandra:
// move Sandra subquest into Nibble 3 of QUEST_SouthTulimshar
set @sandra, TMW_Quest - 10;
set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_3_MASK) | (@sandra << NIBBLE_3_SHIFT));
set TMW_Quest, 10;
set @sandra, 0;
+ goto L_Vincent;
+
L_Vincent:
// move Vincent subquest into Nibble 2 of QUEST_SouthTulimshar
set @vincent, TMW_Quest - 8;
set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_2_MASK) | (@vincent << NIBBLE_2_SHIFT));
set TMW_Quest, 8;
set @vincent, 0;
+ goto L_Sarah;
+
L_Sarah:
// move Sarah subquest into Nibble 1 of QUEST_SouthTulimshar
set @sarah, TMW_Quest - 6;
set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_1_MASK) | (@sarah << NIBBLE_1_SHIFT));
set TMW_Quest, 6;
set @sarah, 0;
+ goto L_Bernard_Mikhail;
+
L_Bernard_Mikhail:
// move Bernard and Mikhail subquest into Nibble 0 of QUEST_SouthTulimshar
set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(NIBBLE_0_MASK) | (TMW_Quest << NIBBLE_0_SHIFT));
set TMW_Quest, 0;
+ goto L_Done;
+
L_Done:
return;
}
-|script|#ClearGlobalVars|-1,
{
+ end;
+
OnInit:
// Clear some entries of the arrays which save the Fluffy Hunting highscore list
set $@loop, 5;
+ goto L_FluffyClear;
L_FluffyClear:
if ($@loop == 12)
@@ -254,6 +270,7 @@ L_FluffyClear:
// Clear the array which saves the teams who beat the Illia quest
L_IlliaClear:
set $@loop, 0;
+ goto L_IlliaLoop;
L_IlliaLoop:
if ($Illia_Win_Records$[$@loop] == "")