From bc66a98377575c7c8e9592e50cbdcf083d6ecaff Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Fri, 28 Jun 2013 11:41:36 -0700 Subject: Refactor all calls within an if, which is illegal --- world/map/npc/009-1/jack.txt | 12 ++++++++---- world/map/npc/009-1/milly.txt | 31 ++++++++++++------------------- 2 files changed, 20 insertions(+), 23 deletions(-) (limited to 'world/map/npc/009-1') diff --git a/world/map/npc/009-1/jack.txt b/world/map/npc/009-1/jack.txt index 65968d5e..f92813db 100644 --- a/world/map/npc/009-1/jack.txt +++ b/world/map/npc/009-1/jack.txt @@ -39,8 +39,11 @@ mes "[Jack Lumber]"; mes "\"Hello there, my name is Jack Lumber, the enemy of all trees. If you need some firewood just let me know.\""; - if (@inspector == 1) - callsub S_NohMask_Ask; + if (@inspector != 1) + goto L_NotInspector; + callsub S_NohMask_Ask; + +L_NotInspector: next; if (@Q_Forestbow < 1) goto L_Close; @@ -96,8 +99,9 @@ L_Bow_state_2: if (@Q_Forestbow > 3) goto L_Bow_state_4; mes "\"Good luck hunting those tree monsters - you will need it.\""; - if (@inspector == 1) - callsub S_NohMask_Ask; + if (@inspector != 1) + goto L_Close; + callsub S_NohMask_Ask; goto L_Close; L_Bow_state_4: diff --git a/world/map/npc/009-1/milly.txt b/world/map/npc/009-1/milly.txt index a6b505cc..b5a482a2 100644 --- a/world/map/npc/009-1/milly.txt +++ b/world/map/npc/009-1/milly.txt @@ -29,8 +29,7 @@ mes "[Milly]"; mes "\"Hello traveler, welcome to Hurnscald.\""; next; - if (@inspector == 1) - callsub S_InspectorQuest; + callsub S_InspectorMaybe; mes "\"Have you met Kfahr yet? He is the greatest hero that ever walked the land of Hurnscald!\""; menu @@ -61,8 +60,7 @@ L_NoKnifeYet: mes "[Milly]"; mes "\"Hi again.\""; next; - if (@inspector == 1) - callsub S_InspectorQuest; + callsub S_InspectorMaybe; mes "\"Have you talked to Kfahr lately?\""; menu @@ -109,8 +107,7 @@ L_GotBoneKnife: mes "[Milly]"; mes "\"Hi there.\""; next; - if (@inspector == 1) - callsub S_InspectorQuest; + callsub S_InspectorMaybe; mes "\"I heard that you got an exotic knife from Kfahr."; mes "Would you kindly show it to me?\""; @@ -159,8 +156,7 @@ L_SavedRossy: mes "[Milly]"; mes "\"Hi friend!\""; next; - if (@inspector == 1) - callsub S_InspectorQuest; + callsub S_InspectorMaybe; mes "\"Word of your fame has spread throughout all Hurnscald of your great heroism by helping my friends Rossy and Julia!\""; next; @@ -195,8 +191,7 @@ L_SavedCindy: mes "[Milly]"; mes "\"Hi!\""; next; - if (@inspector == 1) - callsub S_InspectorQuest; + callsub S_InspectorMaybe; mes "\"Are the rumors true?\""; next; @@ -234,8 +229,7 @@ L_GotSetzer: mes "[Milly]"; mes "\"Hello!\""; next; - if (@inspector == 1) - callsub S_InspectorQuest; + callsub S_InspectorMaybe; mes "\"I heard that you got hold of a Setzer!\""; next; @@ -266,8 +260,7 @@ L_OfferCap: mes "[Milly]"; mes "\"Hi there, hero of Hurnscald!\""; next; - if (@inspector == 1) - callsub S_InspectorQuest; + callsub S_InspectorMaybe; mes "\"You really have proven yourself over and over. There is no way anyone could possibly say, you are not the equal of Kfahr!\""; next; @@ -326,8 +319,7 @@ L_FinishedGood: mes "[Milly]"; mes "\"Hi there friend, my hero!\""; next; - if (@inspector == 1) - callsub S_InspectorQuest; + callsub S_InspectorMaybe; mes "\"Wear the copter beany cap in good health, mana and wealth! See you around!\""; goto L_Close; @@ -336,8 +328,7 @@ L_FinishedBad: mes "[Milly]"; mes "\"Oh, it's you. I suppose you're here to make fun of my hat again.\""; next; - if (@inspector == 1) - callsub S_InspectorQuest; + callsub S_InspectorMaybe; mes "\"Won't you continue your travels soon?\""; menu "That's what I'm going to do.", -, @@ -368,7 +359,9 @@ L_Close: set @inspector, 0; close; -S_InspectorQuest: +S_InspectorMaybe: + if (@inspector != 1) + return; menu "Have you seen anything strange lately?", L_NohMask_Strange, "Do you know anything about the recent robberies?", L_NohMask_Robbery, -- cgit v1.2.3-60-g2f50