summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/clear_vars.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/npc/functions/clear_vars.txt b/npc/functions/clear_vars.txt
index 706c5cd8..857e3793 100644
--- a/npc/functions/clear_vars.txt
+++ b/npc/functions/clear_vars.txt
@@ -57,5 +57,26 @@ function script ClearVariables {
set QUEST_xmas08_state, 0;
+ set QUEST_Easter09, 0;
+
+ set Candyman, 0; // Halloween 2009
+
+ set QUEST_Christmas09_state, 0;
+
+ if (#BankAccount < 0) goto FixBank;
+
+ return;
+
+FixBank:
+ if (zeny >= -#BankAccount) goto L_Fix_Full;
+
+ // Partial fix
+ set #BankAccount, #BankAccount + zeny
+ set zeny, 0;
+ return;
+
+L_Fix_Full:
+ set zeny, zeny + #BankAccount;
+ set #BankAccount, 0;
return;
}