summaryrefslogtreecommitdiff
path: root/world/map/npc/018-2
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/018-2')
-rw-r--r--world/map/npc/018-2/angus.txt12
-rw-r--r--world/map/npc/018-2/books.txt15
-rw-r--r--world/map/npc/018-2/caul.txt11
-rw-r--r--world/map/npc/018-2/miners.txt34
-rw-r--r--world/map/npc/018-2/receptionist.txt18
5 files changed, 63 insertions, 27 deletions
diff --git a/world/map/npc/018-2/angus.txt b/world/map/npc/018-2/angus.txt
index d5b9ad08..f44bef56 100644
--- a/world/map/npc/018-2/angus.txt
+++ b/world/map/npc/018-2/angus.txt
@@ -4,15 +4,23 @@
set @honorific$, "lad";
if (Sex == 0) set @honorific$, "lass";
- if (Inspector == 10) goto L_NohMask;
+ callfunc "ClearVariables";
+
+ set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
+
+ if (@inspector == 10) goto L_NohMask;
mes "[Angus]";
mes "Angus is tinkering with some mechanical concoction.";
mes "\"It keeps breakin' left an' right... fortunat'ly I put in redundancies everywhere, but I haf' to keep repairin'.\"";
- close;
+ goto L_Close;
L_NohMask:
mes "[Angus]";
mes "\"I'm sorry, " + @honorific$ + ", I truely am, but I stay in the town. One o' the miners might have heard something.\"";
+ goto L_Close;
+
+L_Close:
+ set @inspector, 0;
close;
}
diff --git a/world/map/npc/018-2/books.txt b/world/map/npc/018-2/books.txt
index 260b670d..81b439da 100644
--- a/world/map/npc/018-2/books.txt
+++ b/world/map/npc/018-2/books.txt
@@ -1,15 +1,24 @@
//
018-2.gat,112,19,0|script|#Bookcase38|127,0,1{
- if (Inspector == 11) goto L_NohMask;
+ callfunc "ClearVariables";
+
+ set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
+
+ if (@inspector == 11) goto L_NohMask;
mes "Looking over the bookcase, you find nothing strange or out of order.";
- close;
+ goto L_Close;
L_NohMask:
mes "Looking over the bookcase closely, you find a book is upside down.";
next;
mes "The book has been hollowed out. Inside is a theater mask and a note that you cannot even begin to read.";
next;
- set Inspector, 12;
+ set @inspector, 12;
+ set QUEST_Hurnscald, (QUEST_Hurnscald & ~(NIBBLE_3_MASK)) | (@inspector << NIBBLE_3_SHIFT);
+ goto L_Close;
+
+L_Close:
+ set @inspector, 0;
close;
}
diff --git a/world/map/npc/018-2/caul.txt b/world/map/npc/018-2/caul.txt
index f1e9ac90..3b5f771f 100644
--- a/world/map/npc/018-2/caul.txt
+++ b/world/map/npc/018-2/caul.txt
@@ -8,6 +8,10 @@
//#################################################################################
018-2.gat,37,22,0|script|Caul|107,{
+ callfunc "ClearVariables";
+
+ set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
+
set @SETZER_INITIAL, 0;
set @SETZER_KNOWS_OIL, 1;
set @SETZER_KNOWS_STINGER, 2;
@@ -59,7 +63,7 @@ L_M_no_monster_oil:
set @choices_nr, @choices_nr + 1;
L_M_no_mopox_cure:
- if (Inspector != 10)
+ if (@inspector != 10)
goto L_M_no_inspector;
set @choice_idx[@choices_nr], @C_nohmask;
@@ -1058,10 +1062,11 @@ L_calc_dempo_color:
L_NohMask:
mes "[Caul]";
mes "\"I'm sorry, but I didn't. I'm staying in town. Try asking one of the miners.\"";
- close;
+ goto L_close;
L_close:
- close;
+ set @inspector, 0;
+ close;
S_Update_Var:
set QUEST_Forestbow_state,
diff --git a/world/map/npc/018-2/miners.txt b/world/map/npc/018-2/miners.txt
index 3597314a..21d57957 100644
--- a/world/map/npc/018-2/miners.txt
+++ b/world/map/npc/018-2/miners.txt
@@ -2,29 +2,33 @@
// Authors: Ali-G, enchilado, Jenalya
018-2.gat,85,23,0|script|Malek|109,{
+ callfunc "ClearVariables";
+
+ set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
set @MIN_GEM_AMOUNT, 7;
- if (Inspector == 10) goto L_NohMask;
+ if (@inspector == 10) goto L_NohMask;
mes "[Malek]";
mes "\"Hi, can I help you at all?\"";
menu
"I'm looking for someone able to make gem powder.", L_GemPowder,
- "I was just having a look, have a nice day.", L_abort;
+ "I was just having a look, have a nice day.", L_Close;
L_NohMask:
mes "[Malek]";
mes "\"Hi, can I help you at all?\"";
menu
"I'm looking for someone able to make gem powder.", L_GemPowder,
- "I was just having a look, have a nice day.", L_abort,
+ "I was just having a look, have a nice day.", L_Close,
"The inspector sent me here to investigate.", L_Investigation;
L_Investigation:
- set Inspector, 11;
+ set @inspector, 11;
+ set QUEST_Hurnscald, (QUEST_Hurnscald & ~(NIBBLE_3_MASK)) | (@inspector << NIBBLE_3_SHIFT);
mes "\"Yeah, we did hear a commotion. We thought we heard someone go down to the basement, but we checked the whole place over and didn't see anything out of the ordinary.\"";
- close;
+ goto L_Close;
L_GemPowder:
mes "[Malek]";
@@ -32,15 +36,15 @@ L_GemPowder:
mes "\"Do you want me to make any for you?\"";
menu
"Yes, I really need some.", L_GemPowderStart,
- "Actually, I don't want anything. Have a nice day.", L_abort;
+ "Actually, I don't want anything. Have a nice day.", L_Close;
L_GemPowderStart:
mes "[Malek]";
mes "\"Well, I can do that. Bring me a gem and I'll make you some powder - hope you don't mind if I keep a little as payment!\"";
menu
"I've got some gems.", L_Check_Gems,
- "I'll be back with a gem soon.", L_abort,
- "Actually, I prefer my gems whole. Thanks anyway.", L_abort;
+ "I'll be back with a gem soon.", L_Close,
+ "Actually, I prefer my gems whole. Thanks anyway.", L_Close;
L_Check_Gems:
mes "[Malek]";
@@ -104,7 +108,8 @@ L_Choose_Gem:
@menuitems$[5], -,
@menuitems$[6], -;
set @menu, @menu - 1;
- if (@menu >= @c) close;
+ if (@menu >= @c)
+ goto L_Close;
if (@menuid[@menu] == 0)
set @gem$, "Diamond";
if (@menuid[@menu] == 1)
@@ -118,7 +123,7 @@ L_Choose_Gem:
if (@menuid[@menu] == 5)
set @gem$, "Amethyst";
if (@menuid[@menu] == 6)
- goto L_abort;
+ goto L_Close;
getinventorylist;
if (countitem(@gem$) < 1)
@@ -145,18 +150,19 @@ L_Choose_Gem:
mes "\"Do you need me to make any more?\"";
menu
"Yes please.", L_Check_Gems,
- "No thank you, this is enough.", L_abort;
+ "No thank you, this is enough.", L_Close;
L_TooMany:
mes "[Malek]";
mes "\"Doesn't look like you've got room for this powder. Come back when you do.\"";
- close;
+ goto L_Close;
L_no_gem:
mes "[Malek]";
mes "\"You don't have that gem.\"";
- close;
+ goto L_Close;
-L_abort:
+L_Close:
+ set @inspector, 0;
close;
}
diff --git a/world/map/npc/018-2/receptionist.txt b/world/map/npc/018-2/receptionist.txt
index f49f68db..e36fe0c4 100644
--- a/world/map/npc/018-2/receptionist.txt
+++ b/world/map/npc/018-2/receptionist.txt
@@ -1,26 +1,30 @@
//
018-2.gat,50,24,0|script|Receptionist|108,{
+ callfunc "ClearVariables";
+
+ set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
+
mes "[Receptionist]";
mes "\"Welcome to the mining camp!";
mes "Do you need anything?\"";
next;
L_Menu:
- if (Inspector == 10)
+ if (@inspector == 10)
menu
"Why was a mine setup here?", L_Mine,
"Can I go into the mine?", L_Enter,
"Did the company build this building?", L_Building,
"Did you hear a commotion here the other night?", L_NohMask,
- "Thank you, no.", -;
- if (Inspector != 10)
+ "Thank you, no.", L_Close;
+ if (@inspector != 10)
menu
"Why was a mine setup here?", L_Mine,
"Can I go into the mine?", L_Enter,
"Did the company build this building?", L_Building,
- "Thank you, no.", -;
- close;
+ "Thank you, no.", L_Close;
+ goto L_Close;
L_Mine:
mes "[Receptionist]";
@@ -57,4 +61,8 @@ L_Question_End:
mes "\"Do you need anything else?\"";
next;
goto L_Menu;
+
+L_Close:
+ set @inspector, 0;
+ close;
}