From 59d152046bc6444d182b4950baaa80e9b8e797e1 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 19 Oct 2021 17:53:10 -0300 Subject: Actually, this askyesno() will cause bugs, so fix them before testing --- npc/031-7/tametomo.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'npc/031-7/tametomo.txt') diff --git a/npc/031-7/tametomo.txt b/npc/031-7/tametomo.txt index d55b85260..8089dc6cd 100644 --- a/npc/031-7/tametomo.txt +++ b/npc/031-7/tametomo.txt @@ -14,7 +14,7 @@ .@lp = (.@q & 2); // Generate the dialog - .@m$=""; + .@m$=" "; if (!.@bt) .@m$+="unless you have a "+getitemlink(Butterfly)+"," if (!.@q) @@ -23,7 +23,7 @@ .@m$+="unless you have a "+getitemlink(LavaManaPearl)+"," mesn; - mesq l("Go away, %s can't you see I'm busy?", .@m$); + mesq l("Go away,%s can't you see I'm busy?", .@m$); // Generate the menu if (!.@bt && countitem(Butterfly)) @@ -33,11 +33,14 @@ if (!.@showbt && !.@showlp) close; + // Display the menu if pertinent + next; select l("Sure, sure, I'm going..."), rif(.@showbt, l("I have a butterfly.")), rif(.@showlp, l("I have a lava mana pearl.")); mes ""; + .@opt = @menu; switch (@menu) { case 2: case 3: @@ -46,19 +49,23 @@ next; inventoryplace EquipmentBlueprintE, 1; mesc l("Accept offer?"); - if (askyesno() == ASK_NO) close; - if (@menu == 2 && !.@bt) { + + if (askyesno() == ASK_NO) break; + + if (.@opt == 2 && !.@bt) { delitem Butterfly, 1; setq AethyrQuest_Tametomo, .@q | 1; Mobpt+=35000; getitem EquipmentBlueprintE, 1; } - if (@menu == 3 && !.@lp) { + + if (.@opt == 3 && !.@lp) { delitem LavaManaPearl, 1; setq AethyrQuest_Tametomo, .@q | 2; Mobpt+=35000; getitem EquipmentBlueprintE, 1; } + mesn; mesq l("Hmpf. A pleasure doing business with you."); } -- cgit v1.2.3-60-g2f50