From e6db4af9d0873d1b1b31680d54e5f8452000ea2b Mon Sep 17 00:00:00 2001 From: Jessica Tölke Date: Thu, 7 Feb 2013 16:27:45 +0100 Subject: Variable restructuring: move Inspector quest to nibble 3 of QUEST_Hurnscald. --- world/map/npc/009-2/alan.txt | 71 ++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 33 deletions(-) (limited to 'world/map/npc/009-2/alan.txt') diff --git a/world/map/npc/009-2/alan.txt b/world/map/npc/009-2/alan.txt index 1715fe72..65a36c0d 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,39 @@ 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.\""; next; - if (Inspector == 1) + if (@inspector == 1) menu - "I am!", -, + "I am!", L_Close, "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer; - close; 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: -- cgit v1.2.3-70-g09d2 From 2c8e25d9b2efd1d8f051db3bd1c7676a044994f1 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Tue, 12 Feb 2013 00:24:41 -0800 Subject: o11c's review of inspector --- world/map/npc/009-1/jack.txt | 22 +++++++++++++--------- world/map/npc/009-2/alan.txt | 9 +++++---- world/map/npc/018-2/receptionist.txt | 12 +++++------- 3 files changed, 23 insertions(+), 20 deletions(-) (limited to 'world/map/npc/009-2/alan.txt') diff --git a/world/map/npc/009-1/jack.txt b/world/map/npc/009-1/jack.txt index 4ccc5d82..9e1ebbe1 100644 --- a/world/map/npc/009-1/jack.txt +++ b/world/map/npc/009-1/jack.txt @@ -144,12 +144,13 @@ L_Shield_state_1: if (@inspector == 1) menu "No thanks.", L_Close, - "Yes, please!", -, + "Yes, please!", L_Yes, "Actually, I'd like to know if you've seen any strange happenings in town.", L_NohMask_Answer; - if (@inspector != 1) - menu - "No thanks.", L_Close, - "Yes, please!", -; + menu + "No thanks.", L_Close, + "Yes, please!", L_Yes; + +L_Yes: mes "[Jack Lumber]"; mes "\"All I need is " + @RAWLOGS_AMOUNT + " raw logs. This needn't be highest-quality wood; pretty much any log you can find should work. Oh, and I'll also need " + @SHIELD_COST + " GP for other materials.\""; next; @@ -211,12 +212,15 @@ L_TooMany: L_Shield_state_3: mes "[Jack Lumber]"; mes "\"I hope that my shield will serve you well!\""; + if (@inspector != 1) + goto L_Close; next; - if (@inspector == 1) - menu - "Me too.", L_Close, - "Have you seen anything that might be connected to the recent robberies in town?", L_NohMask_Answer; + menu + "Me too.", L_Close, + "Have you seen anything that might be connected to the recent robberies in town?", L_NohMask_Answer; +// This is an ugly violation of the scripting standards, +// but it's somewhat complicated to fix. S_NohMask_Ask: next; menu diff --git a/world/map/npc/009-2/alan.txt b/world/map/npc/009-2/alan.txt index 65a36c0d..53715527 100644 --- a/world/map/npc/009-2/alan.txt +++ b/world/map/npc/009-2/alan.txt @@ -202,11 +202,12 @@ L_State_4_TooMany: 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!", L_Close, - "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer; + 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]"; diff --git a/world/map/npc/018-2/receptionist.txt b/world/map/npc/018-2/receptionist.txt index e36fe0c4..5f03c4b1 100644 --- a/world/map/npc/018-2/receptionist.txt +++ b/world/map/npc/018-2/receptionist.txt @@ -18,13 +18,11 @@ L_Menu: "Did the company build this building?", L_Building, "Did you hear a commotion here the other night?", L_NohMask, "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.", L_Close; - goto L_Close; + 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.", L_Close; L_Mine: mes "[Receptionist]"; -- cgit v1.2.3-70-g09d2