From a209e45ac77d47e9fd0ecce7d5b7ddfa39d80bf0 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 20 Jan 2024 15:06:27 -0300 Subject: Tametomo: Accept Petals --- npc/031-7/tametomo.txt | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/npc/031-7/tametomo.txt b/npc/031-7/tametomo.txt index fcd314fc3..20a1a30dd 100644 --- a/npc/031-7/tametomo.txt +++ b/npc/031-7/tametomo.txt @@ -12,15 +12,21 @@ .@q = getq(AethyrQuest_Tametomo); .@bt = (.@q & 1); .@lp = (.@q & 2); + .@pt = (.@q & 4); + .@or = bitmask_count(.@q); // Generate the dialog .@m$=" "; if (!.@bt) .@m$+="unless you have a "+getitemlink(Butterfly)+","; - if (!.@q) + if (!.@bt && .@or > 1) .@m$+=" or "; if (!.@lp) .@m$+="unless you have a "+getitemlink(LavaManaPearl)+","; + if ((!.@bt || !.@lp) && !.@pt) + .@m$+=" or "; + if (!.@pt) + .@m$+="unless you have a "+getitemlink(Petal)+","; mesn; mesq l("Go away,%s can't you see I'm busy?", .@m$); @@ -30,7 +36,9 @@ .@showbt=true; if (!.@lp && countitem(LavaManaPearl)) .@showlp=true; - if (!.@showbt && !.@showlp) + if (!.@pt && countitem(Petal)) + .@showpt=true; + if (!.@showbt && !.@showlp && !.@showpt) close; // Display the menu if pertinent @@ -38,12 +46,14 @@ select l("Sure, sure, I'm going..."), rif(.@showbt, l("I have a butterfly.")), - rif(.@showlp, l("I have a lava mana pearl.")); + rif(.@showlp, l("I have a lava mana pearl.")), + rif(.@showpt, l("I have a petal.")); mes ""; .@opt = @menu; switch (@menu) { case 2: case 3: + case 4: mesn; mesq l("%s Monster Points, and a %s. That's my final offer.", fnum(35000), getitemlink(EquipmentBlueprintE)); next; @@ -66,6 +76,13 @@ getitem EquipmentBlueprintE, 1; } + if (.@opt == 4 && !.@pt) { + delitem Petal, 1; + setq AethyrQuest_Tametomo, .@q | 4; + Mobpt+=35000; + getitem EquipmentBlueprintE, 1; + } + mesn; mesq l("Hmpf. A pleasure doing business with you."); } -- cgit v1.2.3-70-g09d2