summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/const.txt6
-rw-r--r--npc/002-3_Desert_mines/mine_triggertwo.txt4
-rw-r--r--npc/002-3_Desert_mines/naem.txt4
-rw-r--r--npc/functions/clear_vars.txt5
4 files changed, 13 insertions, 6 deletions
diff --git a/db/const.txt b/db/const.txt
index 07027254..f51f1dfe 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -250,8 +250,10 @@ MFLAG_ELANORE_OMAR 32768 // Told Omar about Elanore's involvement
MFLAG_KNOWS_UNFOCUS_RECIPE 65536 // Luca told me about how to unfocus
-//Flags set in the FLAGS variable:
-FLAG_HAS_BOWLER_BURNSDAY 1
+// Flags set in the FLAGS variable:
+FLAG_HAS_BOWLER_BURNSDAY 1 // every year's poem at burns day, shannon gives you a bowler hat
+FLAG_OPENED_UNDERGROUND 2 // this flag is a replacement for variable Open_Underground_Palace_Barrier, which was used only as bool
+FLAG_GOT_NAEM_GLOVES 4 // this replaces Naem_Quest_Done, which was used as a bool variable
DOCK_tulimshar 1
DOCK_hurnscald 2
diff --git a/npc/002-3_Desert_mines/mine_triggertwo.txt b/npc/002-3_Desert_mines/mine_triggertwo.txt
index 21e1d965..5d005620 100644
--- a/npc/002-3_Desert_mines/mine_triggertwo.txt
+++ b/npc/002-3_Desert_mines/mine_triggertwo.txt
@@ -4,7 +4,7 @@
if (TMW_Quest == 36) goto L_Trigger_2;
if (TMW_Quest == 35) goto L_Trigger_Wrong_2;
- if (TMW_Quest == 34) goto L_Trigger_Wrong_2;
+ if (TMW_Quest == 34) goto L_Trigger_Wrong_2;
mes "There is a large button on the ground. A key hole appears on the button.";
close;
@@ -42,7 +42,7 @@ L_Right_2:
L_Left_2:
set TMW_Quest, 37;
- set Open_Underground_Palace_Barrier, 1;
+ set FLAGS, FLAGS | FLAG_OPENED_UNDERGROUND;
mes "You turn the key left. A clicking sound echoes throughout the mine, followed by a loud thump.";
close;
diff --git a/npc/002-3_Desert_mines/naem.txt b/npc/002-3_Desert_mines/naem.txt
index aca3e0c2..ecd7195b 100644
--- a/npc/002-3_Desert_mines/naem.txt
+++ b/npc/002-3_Desert_mines/naem.txt
@@ -3,7 +3,7 @@
002-3.gat,85,97,6 script Naem 109,{
if (Naem_Quest_Done == 1) goto L_Naem_Complete;
- if (Open_Underground_Palace_Barrier == 1) goto L_Naem_Gloves;
+ if (FLAGS & FLAG_OPENED_UNDERGROUND) goto L_Naem_Gloves;
if (TMW_Quest == 34) goto L_Naem_Code;
if (TMW_Quest == 33) goto L_Naem_Lt;
if (TMW_Quest == 32) goto L_Naem_Memory;
@@ -118,7 +118,7 @@ L_Naem_Gloves:
mes "[Naem]";
mes "\"Hey, good job on getting that together! Take these gloves, they might prove useful in the underground palace.\"";
close;
-
+
L_Naem_TooMany:
mes "[Naem]";
mes "\"You have too many items for me to give you a reward.\"";
diff --git a/npc/functions/clear_vars.txt b/npc/functions/clear_vars.txt
index ae83968f..4b3b2f14 100644
--- a/npc/functions/clear_vars.txt
+++ b/npc/functions/clear_vars.txt
@@ -94,6 +94,11 @@ function script ClearVariables {
set Xmas2010, 0;
set Golbenez_Inn_Cost, 0;
+
+ //These lines are needed to migrate stuff from variables to flags
+ if (Open_Underground_Palace_Barrier) set FLAGS, FLAGS | FLAG_OPENED_UNDERGROUND;
+ set Open_Underground_Palace_Barrier, 0;
+
if (#BankAccount < 0) goto FixBank;
return;