summaryrefslogtreecommitdiff
path: root/world/map/npc/009-2
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/009-2')
-rw-r--r--world/map/npc/009-2/alan.txt76
-rw-r--r--world/map/npc/009-2/doctor.txt27
-rw-r--r--world/map/npc/009-2/inspector.txt99
-rw-r--r--world/map/npc/009-2/lena.txt64
-rw-r--r--world/map/npc/009-2/nurse.txt39
5 files changed, 179 insertions, 126 deletions
diff --git a/world/map/npc/009-2/alan.txt b/world/map/npc/009-2/alan.txt
index 1715fe72..53715527 100644
--- a/world/map/npc/009-2/alan.txt
+++ b/world/map/npc/009-2/alan.txt
@@ -9,6 +9,8 @@
// Archer Shop Master
009-2.gat,99,23,0|script|Alan|125,{
+ callfunc "ClearVariables";
+
set @Q_MASK, NIBBLE_0_MASK;
set @Q_SHIFT, NIBBLE_0_SHIFT;
@@ -16,6 +18,8 @@
set @BROKENLOG_EXP, 15;
+ set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
+
if (@Q_status == 1) goto L_State_1;
if (@Q_status == 2) goto L_State_2;
if (@Q_status == 3) goto L_State_3;
@@ -25,16 +29,16 @@
mes "[Alan]";
mes "\"When you want to buy something then please speak to my apprentice. I am only doing special requests.\"";
next;
- if (Inspector == 1)
+ if (@inspector == 1)
menu
"OK, thanks.", -,
"Can you make me a really good bow?", L_State_0_1,
"Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
- if (Inspector != 1)
+ if (@inspector != 1)
menu
"OK, thanks.", -,
"Can you make me a really good bow?", L_State_0_1;
- close;
+ goto L_Close;
L_State_0_1:
mes "[Alan]";
@@ -46,9 +50,8 @@ L_State_0_1:
mes "\"Sorry, I am not making these anymore.\"";
next;
menu
- "Oh, too bad.", -,
+ "Oh, too bad.", L_Close,
"What? Why not?", L_State_0_2;
- close;
L_State_0_2:
mes "[Alan]";
@@ -59,48 +62,46 @@ L_State_0_2:
callsub S_Update_Var;
next;
menu
- "Too bad.", -,
+ "Too bad.", L_Close,
"Did you ask him why?", L_State_0_3;
- close;
L_State_0_3:
mes "[Alan]";
mes "\"Sure I did. But he just told me to leave him alone. Maybe you could ask him what's wrong?\"";
next;
menu
- "OK, I'll ask him.", -,
+ "OK, I'll ask him.", L_Close,
"I am sure he got his reasons.", -;
- close;
L_State_1:
mes "[Alan]";
mes "\"Did you already ask Jack why he won't deliver me any more living wood?\"";
next;
- if (Inspector == 1)
+ if (@inspector == 1)
menu
"No, I haven't had the time yet.", -,
"No, I didn't find him yet.", L_State_1_1,
"Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
- if (Inspector != 1)
+ if (@inspector != 1)
menu
"No, I haven't had the time yet.", -,
"No, I didn't find him yet.", L_State_1_1;
- close;
+ goto L_Close;
L_State_1_1:
mes "[Alan]";
mes "\"When you leave my shop just go southwest over the village plaza. You can't miss it.\"";
- close;
+ goto L_Close;
L_State_2:
mes "[Alan]";
mes "\"Did you already ask Jack why he won't deliver me any more living wood?\"";
next;
- if (Inspector == 1)
+ if (@inspector == 1)
menu
"Yes, I did. He said that the trees turned into dangerous monsters.", -,
"Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
- if (Inspector != 1)
+ if (@inspector != 1)
menu
"Yes, I did. He said that the trees turned into dangerous monsters.", -;
mes "[Alan]";
@@ -109,23 +110,24 @@ L_State_2:
mes "Maybe you will find a piece of wood that is strong enough to become one of my forest bows.\"";
set @Q_status, 3;
callsub S_Update_Var;
- close;
+ goto L_Close;
L_State_3:
mes "[Alan]";
mes "\"How is the hunt going? Did you bring me any wood?\"";
- if (countitem("RawLog") < 1) close;
+ if (countitem("RawLog") < 1)
+ goto L_Close;
next;
- if (Inspector == 1)
+ if (@inspector == 1)
menu
"Here, take a look!", L_State_3_try,
"Yes, but I need it for something else.", -,
"Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
- if (Inspector != 1)
+ if (@inspector != 1)
menu
"Here, take a look!", L_State_3_try,
"Yes, but I need it for something else.", -;
- close;
+ goto L_Close;
L_State_3_try:
if (countitem("RawLog") < 1)
@@ -142,12 +144,12 @@ L_State_3_try:
next;
mes "[Alan]";
mes "\"Sorry, this log was too weak for one of my forest bows. Now it is junk. Give me another.\"";
- if (countitem("RawLog") < 1) close;
+ if (countitem("RawLog") < 1)
+ goto L_Close;
next;
menu
"Sure, here you go.", L_State_3_try,
- "Hey! Stop breaking my stuff!", -;
- close;
+ "Hey! Stop breaking my stuff!", L_Close;
L_State_3_success:
mes "Alan tries as hard as he can but the log won't bend.";
@@ -162,16 +164,16 @@ L_State_4:
mes "[Alan]";
mes "\"I can make you a really nice forest bow out of this. I just need 10,000 GP for material and work time.\"";
next;
- if (Inspector == 1)
+ if (@inspector == 1)
menu
"10,000??? What a ripoff!", -,
"Sure, here you go!", L_State_4_pay,
"Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
- if (Inspector != 1)
+ if (@inspector != 1)
menu
"10,000??? What a ripoff!", -,
"Sure, here you go!", L_State_4_pay;
- close;
+ goto L_Close;
L_State_4_pay:
if (Zeny < 10000)
@@ -185,36 +187,40 @@ L_State_4_pay:
callsub S_Update_Var;
mes "[Alan]";
mes "\"Here you go - have fun with it.\"";
- close;
+ goto L_Close;
L_State_4_nocash:
mes "[Alan]";
mes "\"Seems like you are out of cash.\"";
- close;
+ goto L_Close;
L_State_4_TooMany:
mes "[Alan]";
mes "\"Seems like you don't have room for this bow. Come back later.\"";
- close;
+ goto L_Close;
L_State_5:
mes "[Alan]";
mes "\"I hope you are satisfied with your forest bow. It is one of my best works.\"";
+ if (@inspector != 1)
+ goto L_Close;
next;
- if (Inspector == 1)
- menu
- "I am!", -,
- "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
- close;
+ menu
+ "I am!", L_Close,
+ "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
L_NohMask_Answer:
mes "[Alan]";
mes "\"No.\"";
- close;
+ goto L_Close;
L_No_Log:
mes "[Alan]";
mes "\"Where should I look at? You don't have a raw log.\"";
+ goto L_Close;
+
+L_Close:
+ set @inspector, 0;
close;
S_Update_Var:
diff --git a/world/map/npc/009-2/doctor.txt b/world/map/npc/009-2/doctor.txt
index 7b6931e0..c9b5684a 100644
--- a/world/map/npc/009-2/doctor.txt
+++ b/world/map/npc/009-2/doctor.txt
@@ -1,6 +1,10 @@
// Doctor
009-2.gat,148,25,0|script|Doctor|107,{
+ callfunc "ClearVariables";
+
+ set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
+
if (getequipid(equip_head) == 616) goto L_Axe;
if (getequipid(equip_head) == 621) goto L_Eyepatch;
@@ -8,26 +12,27 @@
mes "\"Hello, can I help you?\"";
next;
- if (Inspector == 1)
+ if (@inspector == 1)
menu
"I think I am sick!", L_Cure,
"No, I feel fine.", -,
"Have you seen anything strange in town? Anything that might have to do with the robberies?", L_NohMask;
- if (Inspector != 1)
+ if (@inspector != 1)
menu
"I think I am sick!", L_Cure,
"No, I feel fine.", -;
mes "[Doctor]";
mes "\"Then please stop wasting my precious time.\"";
- close;
+ goto L_Close;
L_Cure:
mes "[Doctor]";
- if (sc_check(sc_poison)) goto L_CurePoison;
+ if (sc_check(sc_poison))
+ goto L_CurePoison;
mes "The doctor examines you briefly.";
mes "\"Nonsense! You look fine and dandy to me. All you need is a bit more exercise and fresh fruit in your diet!\"";
- close;
+ goto L_Close;
L_CurePoison:
mes "\"Well, well, well! Look at all those green bubbles coming out of your head; that looks like poisoning to me! Did you eat something rotten?\"";
@@ -41,7 +46,7 @@ L_CurePoison:
sc_end(sc_slowpoison);
mes "*Ouch!*";
mes "\"Next time, be more careful! Make sure to cook any meats before you eat them, and don't eat fish once it starts to smell.\"";
- close;
+ goto L_Close;
L_Axe:
mes "[Doctor]";
@@ -49,7 +54,7 @@ L_Axe:
next;
mes "[Doctor]";
mes "\"Wait. Thats just a fake. Shame on you!\"";
- close;
+ goto L_Close;
L_Eyepatch:
mes "[Doctor]";
@@ -60,7 +65,7 @@ L_Eyepatch:
"No thank you", -;
mes "[Doctor]";
mes "\"If you change your mind, please come back and see me.\"";
- close;
+ goto L_Close;
L_Eyepatch_GlassEye:
mes "[Doctor]";
@@ -69,10 +74,14 @@ L_Eyepatch_GlassEye:
next;
mes "[Doctor]";
mes "\"I can't seem to find where I put that box. You should come back later, I may have found them by then.\"";
- close;
+ goto L_Close;
L_NohMask:
mes "[Doctor]";
mes "\"No, I haven't seen anything.\"";
+ goto L_Close;
+
+L_Close:
+ set @inspector, 0;
close;
}
diff --git a/world/map/npc/009-2/inspector.txt b/world/map/npc/009-2/inspector.txt
index e1461584..59bbd067 100644
--- a/world/map/npc/009-2/inspector.txt
+++ b/world/map/npc/009-2/inspector.txt
@@ -1,25 +1,29 @@
//
009-2.gat,24,99,0|script|Inspector#Hurnscald|150,{
- if (Inspector == 0 && BaseLevel >= 30) goto L_NohMask_Start;
- if (Inspector == 1) goto L_NohMask_AskVillage;
- if (Inspector == 2) goto L_NohMask_OldWoman;
- if (Inspector == 3) goto L_NohMask_TheaterMask;
- if (Inspector == 4) goto L_NohMask_TravelingTroupe;
- if (Inspector == 5) goto L_NohMask_OldMan;
- if (Inspector == 6) goto L_NohMask_OldMan_2;
- if (Inspector == 7) goto L_NohMask_Alibi;
- if (Inspector == 8) goto L_NohMask_Alibi_2;
- if (Inspector == 9) goto L_NohMask_Alibi_3;
- if (Inspector == 10) goto L_NohMask_Satchel;
- if (Inspector == 11) goto L_NohMask_Basement;
- if (Inspector == 12) goto L_NohMask_Note;
- if (Inspector == 13) goto L_NohMask_TravelingTroupe_2;
- if (Inspector == 14) goto L_NohMask_Over;
- if (Inspector == 15) goto L_NohMask_End;
+ callfunc "ClearVariables";
+
+ set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
+
+ if (@inspector == 0 && BaseLevel >= 30) goto L_NohMask_Start;
+ if (@inspector == 1) goto L_NohMask_AskVillage;
+ if (@inspector == 2) goto L_NohMask_OldWoman;
+ if (@inspector == 3) goto L_NohMask_TheaterMask;
+ if (@inspector == 4) goto L_NohMask_TravelingTroupe;
+ if (@inspector == 5) goto L_NohMask_OldMan;
+ if (@inspector == 6) goto L_NohMask_OldMan_2;
+ if (@inspector == 7) goto L_NohMask_Alibi;
+ if (@inspector == 8) goto L_NohMask_Alibi_2;
+ if (@inspector == 9) goto L_NohMask_Alibi_3;
+ if (@inspector == 10) goto L_NohMask_Satchel;
+ if (@inspector == 11) goto L_NohMask_Basement;
+ if (@inspector == 12) goto L_NohMask_Note;
+ if (@inspector == 13) goto L_NohMask_TravelingTroupe_2;
+ if (@inspector == 14) goto L_NohMask_Over;
+ if (@inspector == 15) goto L_NohMask_End;
mes "[Inspector]";
mes "\"I'm sorry, but I'm busy looking into this string of robberies.\"";
- close;
+ goto L_Close;
L_NohMask_Start:
mes "\"Hmm...what to do.\"";
@@ -29,97 +33,110 @@ L_NohMask_Start:
mes "\"You look capable, will you help me solve these robberies?\"";
next;
menu
- "Yes", L_NohMask_Accept,
- "No", -;
- close;
+ "Yes.", L_NohMask_Accept,
+ "No.", L_Close;
L_NohMask_Accept:
- set Inspector, 1;
+ set @inspector, 1;
+ callsub S_Update_Mask;
mes "[Inspector]";
mes "\"Ok then. I'd like you to ask the villagers about the recent string of robberies.\"";
- close;
+ goto L_Close;
L_NohMask_AskVillage:
mes "[Inspector]";
mes "\"Please continue talking to the villagers.\"";
- close;
+ goto L_Close;
L_NohMask_OldWoman:
mes "[Inspector]";
mes "\"Hm...I don't know if I trust her eyesight or memory. See if someone else knows anything.\"";
- close;
+ goto L_Close;
L_NohMask_TheaterMask:
- set Inspector, 4;
+ set @inspector, 4;
+ callsub S_Update_Mask;
mes "[Inspector]";
mes "\"Someone in a theater mask, eh? There was a traveling theater troupe in town recently, but they've moved on to Tulimshar. Please go talk to their leader about this.\"";
- close;
+ goto L_Close;
L_NohMask_TravelingTroupe:
mes "[Inspector]";
mes "\"Please go talk to the leader of the traveling troupe about the theater mask.\"";
- close;
+ goto L_Close;
L_NohMask_OldMan:
- set Inspector, 6;
+ set @inspector, 6;
+ callsub S_Update_Mask;
mes "[Inspector]";
mes "\"Hm...an old man? Could you interrogate him for me?\"";
- close;
+ goto L_Close;
L_NohMask_OldMan_2:
mes "[Inspector]";
mes "\"Have you talked with the old man yet?\"";
- close;
+ goto L_Close;
L_NohMask_Alibi:
mes "[Inspector]";
mes "\"Can you verify that with his wife?\"";
- close;
+ goto L_Close;
L_NohMask_Alibi_2:
- set Inspector, 9;
+ set @inspector, 9;
+ callsub S_Update_Mask;
mes "[Inspector]";
mes "\"Hm...then it couldn't be him. I'm not sure where to go from here, maybe you can find something else. Try talking to everyone again.\"";
- close;
+ goto L_Close;
L_NohMask_Alibi_3:
mes "[Inspector]";
mes "\"Made any progress yet?\"";
- close;
+ goto L_Close;
L_NohMask_Satchel:
mes "[Inspector]";
mes "\"Then go north and investigate!\"";
- close;
+ goto L_Close;
L_NohMask_Basement:
mes "[Inspector]";
mes "\"Did you look over the basement?\"";
- close;
+ goto L_Close;
L_NohMask_Note:
- set Inspector, 13;
+ set @inspector, 13;
+ callsub S_Update_Mask;
mes "[Inspector]";
mes "\"What a strange note. I'll keep track of this, while you return the mask to the troupe.\"";
mes "";
mes "\"By the way, stay sharp! I may call upon you again.\"";
- close;
+ goto L_Close;
L_NohMask_TravelingTroupe_2:
mes "[Inspector]";
mes "\"Please return the mask to the traveling troupe.\"";
- close;
+ goto L_Close;
L_NohMask_Over:
- set Inspector, 15;
+ set @inspector, 15;
+ callsub S_Update_Mask;
mes "[Inspector]";
mes "\"My men have found all of the stolen items. They were all in the mining camp. We still don't know who did it.\"";
mes "[2500 experience points]";
getexp 2500, 0;
- close;
+ goto L_Close;
L_NohMask_End:
mes "[Inspector]";
mes "\"Remember to stay sharp. I might need your help on another case.\"";
+ goto L_Close;
+
+L_Close:
+ set @inspector, 0;
close;
+
+S_Update_Mask:
+ set QUEST_Hurnscald, (QUEST_Hurnscald & ~(NIBBLE_3_MASK)) | (@inspector << NIBBLE_3_SHIFT);
+ return;
}
diff --git a/world/map/npc/009-2/lena.txt b/world/map/npc/009-2/lena.txt
index e458eb74..c959d86f 100644
--- a/world/map/npc/009-2/lena.txt
+++ b/world/map/npc/009-2/lena.txt
@@ -1,20 +1,26 @@
// Quest for Fairy Hat and Forest Armor
+// Variables used: nibble 0 of QUEST_Hurnscald
009-2.gat,146,43,0|script|Lena|182,{
- if (TMW_Quest >= 46) goto L_Lena_Done;
- if (TMW_Quest == 45) goto L_Lena_Success;
- if (TMW_Quest == 44) goto L_Lena_Bandit_Leader_Fail;
- if (TMW_Quest == 43) goto L_Lena_Bandit_Leader_Fail;
- if (TMW_Quest == 42) goto L_Lena_Bandit_Leader;
- if (TMW_Quest == 41) goto L_Lena_Fairy_Hat;
- if (TMW_Quest == 40) && (BaseLevel >= 30) goto L_Lena_Start;
+ // This NPC previously used the variable TMW_Quest
+ callfunc "ClearVarTMW_Quest";
+
+ set @state, ((QUEST_Hurnscald & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
+
+ if (@state >= 6) goto L_Lena_Done;
+ if (@state == 5) goto L_Lena_Success;
+ if (@state == 4) goto L_Lena_Bandit_Leader_Fail;
+ if (@state == 3) goto L_Lena_Bandit_Leader_Fail;
+ if (@state == 2) goto L_Lena_Bandit_Leader;
+ if (@state == 1) goto L_Lena_Fairy_Hat;
+ if (BaseLevel >= 30) goto L_Lena_Start;
mes "[Lena]";
mes "\"I got ambushed by a group of bandits and one of them stabbed me pretty good. Hopefully I heal up soon so I can fight this menace.\"";
next;
mes "\"Ah, I wish my dear friend Nickos could be here. He's one of the guards in Tulimshar and he'd know how to deal with those outlaws!\"";
- close;
+ goto L_Close;
L_Lena_Start:
mes "[Lena]";
@@ -22,20 +28,20 @@ L_Lena_Start:
menu
"Don't worry, I can take out some of these scumbags.", L_Lena_Approves,
"I think I left my courage in another pair of pants. See you later!", L_Lena_No_Fan;
- close;
L_Lena_Approves:
- set TMW_Quest, 41;
+ set @state, 1;
+ callsub S_Update_Var;
mes "[Lena]";
mes "\"You look like you can handle yourself in a fight. If you can take on this scourge I'll reward you with a hat like mine. In order to prove your mettle, bring me 10 Bandit Hoods so I know they've met their match.\"";
areamonster "008-1.gat",25,60,40,65,"Bandit",1064,3, "::";
areamonster "011-1.gat",35,40,65,60,"Bandit",1064,3, "::";
- close;
+ goto L_Close;
L_Lena_No_Fan:
mes "[Lena]";
mes "\"What will Hurnscald do if these bandits overrun the town? I hope you reconsider.\"";
- close;
+ goto L_Close;
L_Lena_Fairy_Hat:
if (countitem("BanditHood") < 10)
@@ -43,7 +49,8 @@ L_Lena_Fairy_Hat:
getinventorylist;
if (@inventorylist_count - (countitem("BanditHood")== 10) > 99)
goto L_TooMany;
- set TMW_Quest, 42;
+ set @state, 2;
+ callsub S_Update_Var;
delitem "BanditHood", 10;
getitem "FairyHat", 1;
mes "[Lena]";
@@ -53,12 +60,11 @@ L_Lena_Fairy_Hat:
menu
"Consider it done!", L_Lena_Bandit_Leader_Yes,
"Woah there, that sounds a bit harder than what I can succeed at.", L_Lena_NoWay;
- close;
L_Lena_NotEnough:
mes "[Lena]";
mes "\"You don't have enough Bandit Hoods to prove you are taking care of this threat. Please come back with 10 Bandit Hoods to show you are taking care of these bandits.\"";
- close;
+ goto L_Close;
L_Lena_Bandit_Leader:
mes "[Lena]";
@@ -66,44 +72,54 @@ L_Lena_Bandit_Leader:
menu
"Consider it done!", L_Lena_Bandit_Leader_Yes,
"Woah there, that sounds a bit harder than what I can succeed at.", L_Lena_NoWay;
- close;
L_Lena_Bandit_Leader_Yes:
- set TMW_Quest, 43;
+ set @state, 3;
+ callsub S_Update_Var;
areamonster "008-1.gat",25,60,40,65,"Bandit",1064,3, "::";
areamonster "011-1.gat",35,40,65,60,"Bandit",1064,3, "::";
mes "[Lena]";
mes "\"You have a brave heart. Though I know you can succeed on your own, I recommend finding others to help you defeat the bandit leader. I believe he could pose a significant threat to solitary individuals seeking to challenge him. Good luck!\"";
- close;
+ goto L_Close;
L_Lena_NoWay:
mes "[Lena]";
mes "\"That is too bad. Feel free to return at any time. This bandit threat needs to be pushed back.\"";
- close;
+ goto L_Close;
L_Lena_Bandit_Leader_Fail:
- set TMW_Quest, 43;
+ set @state, 3;
+ callsub S_Update_Var;
mes "[Lena]";
mes "\"You haven't killed the bandit leader yet. This is a big problem. Please be careful.\"";
- close;
+ goto L_Close;
L_Lena_Success:
getinventorylist;
if (@inventorylist_count == 100)
goto L_TooMany;
- set TMW_Quest, 46;
+ set @state, 6;
+ callsub S_Update_Var;
getitem "ForestArmor", 1;
mes "[Lena]";
mes "\"Excellent! You killed the bandit leader. Here is the armor as I promised you. Safe journeys!\"";
- close;
+ goto L_Close;
L_Lena_Done:
mes "[Lena]";
mes "\"Thank you for all your help. With your efforts, we can only hope this scourge doesn't see a resurgence.\"";
- close;
+ goto L_Close;
L_TooMany:
mes "[Lena]";
mes "\"You have too many items in your inventory. Please get rid of something so I can reward you.\"";
+ goto L_Close;
+
+L_Close:
+ set @state, 0;
close;
+
+S_Update_Var:
+ set QUEST_Hurnscald, (QUEST_Hurnscald & ~(NIBBLE_0_MASK) | (@state << NIBBLE_0_SHIFT));
+ return;
}
diff --git a/world/map/npc/009-2/nurse.txt b/world/map/npc/009-2/nurse.txt
index 7052edc0..b89d1f60 100644
--- a/world/map/npc/009-2/nurse.txt
+++ b/world/map/npc/009-2/nurse.txt
@@ -28,6 +28,8 @@
goto L_TrickOrTreat;
L_Begin:
+ callfunc "ClearVariables";
+
set @SNAKET_AMOUNT, 5;
set @BSCORPIONST_AMOUNT, 10;
// This quest can be done very often: so give less xp
@@ -45,6 +47,8 @@ L_Begin:
set @Q_poison_SHIFT, NIBBLE_7_SHIFT;
set @Q_poison, (QUEST_Forestbow_state & @Q_poison_MASK) >> @Q_poison_SHIFT;
+ set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
+
if (@Q_poison == 7) goto state7;
if (@Q_poison == 6) goto state6;
if (@Q_poison == 5) goto state5;
@@ -59,25 +63,25 @@ L_Usual:
mes "\"How can I help you?\"";
next;
- if (Inspector == 1)
+ if (@inspector == 1)
menu
"Oooh, these wounds! They hurt so much!", L_Heal,
"I don't feel so well, I might be sick.", L_Doctor,
"Have you seen anything out of the ordinary?", L_NohMask,
"No, I'm fine.", -;
- if (Inspector != 1)
+ if (@inspector != 1)
menu
"Oooh, these wounds! They hurt so much!", L_Heal,
"I don't feel so well, I might be sick.", L_Doctor,
"No, I'm fine.", -;
mes "[Nurse]";
mes "\"Then I would ask you to leave. There are people who really need our help.\"";
- close;
+ goto L_Close;
L_Doctor:
mes "[Nurse]";
mes "\"Then you should better see the doctor. He is usually in his office on the 3rd floor.\"";
- close;
+ goto L_Close;
L_Heal:
if (BaseLevel > 20) goto L_NoHeal;
@@ -85,19 +89,19 @@ L_Heal:
mes "\"Here, let me heal you.\"";
next;
heal 10000, 10000;
- close;
+ goto L_Close;
L_NoHeal:
mes "[Nurse]";
mes "\"I'm sorry but I'm here only to help young people.";
mes "Your level is already higher than 20.";
mes "You can get some rest in the inn near here.\"";
- close;
+ goto L_Close;
L_NohMask:
mes "[Nurse]";
mes "\"I'm too busy here to observe the town.\"";
- close;
+ goto L_Close;
state0:
mes "[Nurse]";
@@ -124,7 +128,7 @@ L_firstquest:
L_ExplainAgain1:
mes "\"Please bring me five tongues of snakes and ten stingers of black scorpions.\"";
- close;
+ goto L_Close;
state1:
mes "[Nurse]";
@@ -134,7 +138,7 @@ state1:
"Actually, I have another question.", L_Usual,
"Sorry, I forgot. What shall I bring you?", L_ExplainAgain1,
"I have what you asked for.", -,
- "I'm still working on that.", quit;
+ "I'm still working on that.", L_Close;
if (countitem("SnakeTongue") < @SNAKET_AMOUNT || countitem("BlackScorpionStinger") < @BSCORPIONST_AMOUNT)
goto L_NotEnough;
delitem "SnakeTongue", @SNAKET_AMOUNT;
@@ -150,7 +154,7 @@ state1:
L_ExplainAgain2:
mes "\"Please bring me ten acorns, five red apples, five green apples and also five oranges. And we need some small healing potions. They will be useful to hold off the baneful effects. Three of them will be enough, I guess.\"";
- close;
+ goto L_Close;
state2:
mes "You look at the nurse, who seems to be really tired, with shadows under her eyes. When she recognizes you, she smiles.";
@@ -161,7 +165,7 @@ state2:
"Actually, I have another question.", L_Usual,
"I have a bad memory. Can you tell me again what we need?", L_ExplainAgain2,
"I managed to get everything we need.", -,
- "I will go and get it.", quit;
+ "I will go and get it.", L_Close;
if (countitem("Acorn") < @ACORNS_AMOUNT
|| countitem("GreenApple") < @GREENAPPLE_AMOUNT
|| countitem("RedApple") < @REDAPPLE_AMOUNT
@@ -199,7 +203,7 @@ L_Chemistry:
mes "\"If we make a mistake, this might be exhausting and painful, so you should rest a while and prepare yourself.\"";
next;
mes "\"Come back when you feel ready for that task.\"";
- close;
+ goto L_Close;
state3:
mes "[Nurse]";
@@ -378,7 +382,7 @@ l_hl_m_vn:
// bye bye player!
heal -Hp, 0;
// close instead of telling how much stabilizer is needed
- close;
+ goto L_Close;
// goto check_st;
l_hl_l_vn:
@@ -426,13 +430,13 @@ allcorrect:
setskill SKILL_RESIST_POISON, 1;
set @Q_poison, 7;
callsub S_Update_Var;
- close;
+ goto L_Close;
notallcorrect:
mes "[Nurse]";
mes "\"It didn't work. You are a really brave person. Now you should rest and recover. I hope you won't give up now. Please come back later, so we can try it again.\"";
next;
- close;
+ goto L_Close;
state4:
mes "The nurse has a worried look in her face.";
@@ -500,9 +504,10 @@ L_NotEnough:
if (@Q_poison == 2)
goto L_ExplainAgain2;
// the following close *should* never be reached, but who knows, whoever will mess this script up!
- close;
+ goto L_Close;
-quit:
+L_Close:
+ set @inspector, 0;
close;
S_Update_Var: