From 3a50328148c111d329322f5930c5332eb0c5dc48 Mon Sep 17 00:00:00 2001 From: Jessica Tölke Date: Sun, 3 Feb 2013 17:31:07 +0100 Subject: Variable restructuring: move Quest_demon_mines into Nibble 2 of QUEST_Hurnscald. --- world/map/npc/018-3/bookcase.txt | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'world/map/npc/018-3') diff --git a/world/map/npc/018-3/bookcase.txt b/world/map/npc/018-3/bookcase.txt index 2e04c06b..38af0d0e 100644 --- a/world/map/npc/018-3/bookcase.txt +++ b/world/map/npc/018-3/bookcase.txt @@ -1,15 +1,18 @@ // 018-3.gat,75,123,0|script|#DemonMineBookcase1|127,{ - if (QUEST_demon_mines == 0) goto L_Search; + callfunc "ClearVariables"; + + set @state, ((QUEST_Hurnscald & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT); + + if (@state == 0) goto L_Search; mes "You see nothing different about the bookcase."; mes "Do you want to search it again anyways?"; next; menu - "Yes", L_Search, - "No", -; - close; + "Yes.", L_Search, + "No.", L_Close; L_Search: mes "After searching the bookcase, you were able to find a few passages that you can read."; @@ -50,7 +53,17 @@ L_Search: mes ""; mes "You begin to wonder if you read that list right."; next; - if (QUEST_demon_mines == 0) - set QUEST_demon_mines, 1; + if (@state != 0) + goto L_Close; + set @state, 1; + callsub S_Update_Mask; + goto L_Close; + +L_Close: + set @state, 0; close; + +S_Update_Mask: + set QUEST_Hurnscald, (QUEST_Hurnscald & ~(NIBBLE_2_MASK)) | (@state << NIBBLE_2_SHIFT); + return; } -- cgit v1.2.3-60-g2f50