From c0ba38cd4b68491e28e467889804ebc09c9c002e Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Wed, 2 Apr 2014 11:06:32 -0700 Subject: Clean up main scripts --- world/map/npc/001-2/casino.txt | 29 ++++++++++++++++------------- world/map/npc/001-2/omar.txt | 28 +++++++++++++++++----------- world/map/npc/001-2/phaet.txt | 3 ++- 3 files changed, 35 insertions(+), 25 deletions(-) (limited to 'world/map/npc/001-2') diff --git a/world/map/npc/001-2/casino.txt b/world/map/npc/001-2/casino.txt index d5090135..e14decd6 100644 --- a/world/map/npc/001-2/casino.txt +++ b/world/map/npc/001-2/casino.txt @@ -50,9 +50,7 @@ L_End: next; menu "Yes", L_Begin, - "No", -; - mes "\"As you wish.\""; - goto L_Close; + "No", L_Close; L_Begin: if(countitem("CasinoCoins") < 15) goto L_NoCoin; @@ -112,6 +110,7 @@ L_Ace: "No", L_End; L_Close: + mes "\"As you wish.\""; set @croupier, 0; set @player, 0; set @tempace, 0; @@ -129,9 +128,7 @@ L_Close: "10 coins", L_b10, "50 coins", L_b50, "100 coins", L_b100, - "Maybe I'll play later", -; - mes "Come again."; - goto L_Close; + "Maybe I'll play later", L_Close; L_b1: set @bet, 1; @@ -157,11 +154,15 @@ L_Check: if(countitem("CasinoCoins") < @bet) goto L_NoCoin; delitem "CasinoCoins", @bet; menu - "Choose a color", -, + "Choose a color", L_PickColor, "Choose a number", L_Number; + +L_PickColor: menu - "Black", -, - "Red", -; + "Black", L_Color, + "Red", L_Color; + +L_Color: set @color,rand(2); if(@color == 1) goto L_Lost; mes "You won!"; @@ -170,11 +171,12 @@ L_Check: L_Number: menu - "0", -, "00", -, "1", -, "2", -, "3", -, "4", -, "5", -, "6", -, "7", -, "8", -, - "9", -, "10", -, "11", -, "12", -, "13", -, "14", -, "15", -, "16", -, "17", -, "18", -, - "19", -, "20", -, "21", -, "22", -, "23", -, "24", -, "25", -, "26", -, "27", -, "28", -, - "29", -, "30", -, "31", -, "32", -, "33", -, "34", -, "35", -, "36", -; + "0", L_Menuitems, "00", L_Menuitems, "1", L_Menuitems, "2", L_Menuitems, "3", L_Menuitems, "4", L_Menuitems, "5", L_Menuitems, "6", L_Menuitems, "7", L_Menuitems, "8", L_Menuitems, + "9", L_Menuitems, "10", L_Menuitems, "11", L_Menuitems, "12", L_Menuitems, "13", L_Menuitems, "14", L_Menuitems, "15", L_Menuitems, "16", L_Menuitems, "17", L_Menuitems, "18", L_Menuitems, + "19", L_Menuitems, "20", L_Menuitems, "21", L_Menuitems, "22", L_Menuitems, "23", L_Menuitems, "24", L_Menuitems, "25", L_Menuitems, "26", L_Menuitems, "27", L_Menuitems, "28", L_Menuitems, + "29", L_Menuitems, "30", L_Menuitems, "31", L_Menuitems, "32", L_Menuitems, "33", L_Menuitems, "34", L_Menuitems, "35", L_Menuitems, "36", L_Menuitems; +L_Menuitems: if (@menu == 1) set @number, 0; if (@menu == 2) set @number, 37; if (@menu >= 3) set @number, @menu - 2; @@ -196,6 +198,7 @@ L_Lost: goto L_Close; L_Close: + mes "Come again."; set @number, 0; set @roulette, 0; set @color, 0; diff --git a/world/map/npc/001-2/omar.txt b/world/map/npc/001-2/omar.txt index 105b6f88..1adfa796 100644 --- a/world/map/npc/001-2/omar.txt +++ b/world/map/npc/001-2/omar.txt @@ -40,8 +40,7 @@ function|script|KadiyaSubquestConsts|, menu "Well met! May I ask who you are?", L_omar, "What's wrong with your daughter?", L_kadiya_sick, - "Thank you!", -; - goto L_Close; + "Thank you!", L_Close; L_omar: mes "[Omar]"; @@ -58,8 +57,9 @@ L_kadiya_sick: "Have you asked Elanore the healer?", L_sick_elanore, "How about the Hurnscald hospital?", L_sick_hospital, "Can I help?", L_sick_self, - "I'm sorry to hear that.", -; + "I'm sorry to hear that.", L_Next; +L_Next: mes "[Omar]"; mes "\"Well, she is a strong girl. I am sure that she will get over it eventually.\""; mes "He smiles, but you see doubt in his eyes."; @@ -121,7 +121,9 @@ L_cured_choice: menu "Oh, it was nothing.", L_cured_nothing, "I didn't do it alone; Elanore helped.", L_cured_elanore, - "That will be 5000 GP.", -; + "That will be 5000 GP.", L_Next1; + +L_Next1: mes "[Omar]"; mes "\"Ah, certainly.\""; mes "He hands you a small bag of money."; @@ -209,6 +211,7 @@ S_update_var: set @choice_idx[@choices_nr], @M_POTION; set @choice$[@choices_nr], "This potion will cure your illness!"; set @choices_nr, @choices_nr + 1; + goto L_M_no_cure; L_M_no_cure: if ((countitem("LacedChocolateCake") == 0) || (@Q_status != @Q_STATUS_WANTS_CHOCOCAKE)) @@ -216,6 +219,7 @@ L_M_no_cure: set @choice_idx[@choices_nr], @M_CHOCOCAKE; set @choice$[@choices_nr], "Would you like special chocolate cake?"; set @choices_nr, @choices_nr + 1; + goto L_M_no_chococake; L_M_no_chococake: if ((countitem("LacedOrangeCupcake") == 0) || (@Q_status != @Q_STATUS_WANTS_ORANGECUPCAKE)) @@ -223,6 +227,7 @@ L_M_no_chococake: set @choice_idx[@choices_nr], @M_CUPCAKE; set @choice$[@choices_nr], "Would you like special orange cupcake?"; set @choices_nr, @choices_nr + 1; + goto L_M_no_cupcake; L_M_no_cupcake: set @choice_idx[@choices_nr], 0; @@ -230,13 +235,14 @@ L_M_no_cupcake: set @choices_nr, @choices_nr + 1; menu - @choice$[0], -, - @choice$[1], -, - @choice$[2], -, - @choice$[3], -, - @choice$[4], -, - @choice$[5], -; - + @choice$[0], L_MenuItems, + @choice$[1], L_MenuItems, + @choice$[2], L_MenuItems, + @choice$[3], L_MenuItems, + @choice$[4], L_MenuItems, + @choice$[5], L_MenuItems; + +L_MenuItems: set @choice, @choice_idx[@menu - 1]; if (@choice == @M_NAME) goto L_name; diff --git a/world/map/npc/001-2/phaet.txt b/world/map/npc/001-2/phaet.txt index 36410c48..ebeaa4a0 100644 --- a/world/map/npc/001-2/phaet.txt +++ b/world/map/npc/001-2/phaet.txt @@ -7,8 +7,9 @@ next; menu "Yes", L_Sure, - "No", -; + "No", L_Next; +L_Next: mes "[Phaet the Royal Guard]"; mes "\"Ha ha, coward.\""; close; -- cgit v1.2.3-60-g2f50