From 060390c8abeab1ec6bdc7964ed145b7a9ea5403b Mon Sep 17 00:00:00 2001 From: Jessica Tölke Date: Wed, 23 Jan 2013 22:51:47 +0100 Subject: Reorganization of global variables: Clear unused global variables --- world/map/npc/functions/clear_vars.txt | 62 ++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) (limited to 'world/map/npc/functions') diff --git a/world/map/npc/functions/clear_vars.txt b/world/map/npc/functions/clear_vars.txt index 292356cc..cc6f097d 100644 --- a/world/map/npc/functions/clear_vars.txt +++ b/world/map/npc/functions/clear_vars.txt @@ -142,3 +142,65 @@ L_Fix_Full: set #BankAccount, 0; return; } + +-|script|#ClearGlobalVars|-1,{ +OnInit: + +// Clear some entries of the arrays which save the Fluffy Hunting highscore list + set $@loop, 5; + +L_FluffyClear: + if ($@loop == 12) + goto L_IlliaClear; + + set $Record_Fluffy_Name$[$@loop], ""; + set $Record_Fluffy_Date$[$@loop], ""; + set $Record_Fluffy_Kills[$@loop], 0; + + set $@loop, $@loop + 1; + goto L_FluffyClear; + + +// Clear the array which saves the teams who beat the Illia quest +L_IlliaClear: + set $@loop, 0; + +L_IlliaLoop: + if ($Illia_Win_Records$[$@loop] == "") + goto L_EventClear; + + set $Illia_Win_Records$[$@loop], ""; + + set $@loop, $@loop + 1; + goto L_IlliaLoop; + +L_EventClear: + set $@loop, 0; + +// Clear global variable used in the Halloween event 2009 + set $CandyOpsComplete, 0; + +// Clear global variables used in the Easter event 2010 + set $Easter_2010_Npc_State1, 0; + set $Easter_2010_Npc_State2, 0; + set $Easter_2010_Egg_Loc_State1, 0; + set $Easter_2010_Egg_Loc_State2, 0; + set $Easter_2010_Egg_Loc_State3, 0; + set $Easter_2010_Egg_Loc_State4, 0; + set $Easter_2010_Egg_Loc_State5, 0; + +// Clear global variables used in the Halloween event 2010 + set $hween10, 0; + set $hween10_tondel, 0; + set $hween10_mmallow, 0; + set $hween10_jelskul, 0; + set $hween10_canpump, 0; + +// Clear global variable used in Christmas event 2010 + set $Golbenez_Inn_Cost, 0; + +// Variable was used in Voltain's script, was renamed and turned into a temporary variable + set $state, 0; + + end; +} -- cgit v1.2.3-60-g2f50