From eb291d1c427ad057c2288d010ccd099cfd2b777d Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Sun, 30 Jan 2011 11:25:40 +0100 Subject: remove variable Open_Underground_Palace_Barrier use FLAGS variable at bit FLAG_OPENED_UNDERGROUND which is defined in const.txt --- npc/002-3_Desert_mines/mine_triggertwo.txt | 4 ++-- npc/002-3_Desert_mines/naem.txt | 4 ++-- npc/functions/clear_vars.txt | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'npc') 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; -- cgit v1.2.3-70-g09d2 From a3024a4ca87ea4ec974076de8fabc66ce9cac0bd Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Sun, 30 Jan 2011 11:29:48 +0100 Subject: replace variable Naem_Quest_Done by bit in FLAGS var --- npc/002-3_Desert_mines/naem.txt | 4 ++-- npc/functions/clear_vars.txt | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'npc') diff --git a/npc/002-3_Desert_mines/naem.txt b/npc/002-3_Desert_mines/naem.txt index ecd7195b..5f0f9bd6 100644 --- a/npc/002-3_Desert_mines/naem.txt +++ b/npc/002-3_Desert_mines/naem.txt @@ -2,7 +2,7 @@ 002-3.gat,85,97,6 script Naem 109,{ - if (Naem_Quest_Done == 1) goto L_Naem_Complete; + if (FLAGS & FLAG_GOT_NAEM_GLOVES) goto L_Naem_Complete; 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; @@ -113,7 +113,7 @@ L_Naem_Code: L_Naem_Gloves: getinventorylist; if (@inventorylist_count == 100) goto L_Nathan_TooMany; - set Naem_Quest_Done, 1; + set FLAGS, FLAGS | FLAG_GOT_NAEM_GLOVES; getitem "MinerGloves", 1; mes "[Naem]"; mes "\"Hey, good job on getting that together! Take these gloves, they might prove useful in the underground palace.\""; diff --git a/npc/functions/clear_vars.txt b/npc/functions/clear_vars.txt index 4b3b2f14..62eada3d 100644 --- a/npc/functions/clear_vars.txt +++ b/npc/functions/clear_vars.txt @@ -99,6 +99,9 @@ function script ClearVariables { if (Open_Underground_Palace_Barrier) set FLAGS, FLAGS | FLAG_OPENED_UNDERGROUND; set Open_Underground_Palace_Barrier, 0; + if (Naem_Quest_Done) set FLAGS, FLAGS | FLAG_GOT_NAEM_GLOVES; + set Naem_Quest_Done, 0; + if (#BankAccount < 0) goto FixBank; return; -- cgit v1.2.3-70-g09d2