From 3317ac2025226ff6ac3281f03385bf9d0969ede4 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 24 Feb 2020 14:15:17 -0300 Subject: Elanore: Batches of Lifestones --- npc/004-1/elanore.txt | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) (limited to 'npc') diff --git a/npc/004-1/elanore.txt b/npc/004-1/elanore.txt index 8909123b5..d22caaafa 100644 --- a/npc/004-1/elanore.txt +++ b/npc/004-1/elanore.txt @@ -9,7 +9,8 @@ menu rif(Zeny >= .@price, l("Please heal me!")), L_Healing, l("Do you make Lifestones?"), L_Lifestones, - l("Another time, maybe."), L_Close; + l("Another time, maybe."), -; + close; L_Healing: @@ -25,23 +26,46 @@ L_Lifestones: next; mes ""; menu - l("OK, I will get them."), L_Close, - l("No way!"), L_Close, - l("Here you are!"), L_Trade; + l("OK, I will get them."), -, + l("No way!"), -, + l("Here you are!"), L_Trade, + l("I want more than one!"), L_Trade_Input; + close; L_Trade: - if (countitem("BugLeg") < 3) goto L_Trade_Missing; - if (countitem("MaggotSlime") < 5) goto L_Trade_Missing; + if (countitem(BugLeg) < 3) goto L_Trade_Missing; + if (countitem(MaggotSlime) < 5) goto L_Trade_Missing; if (Zeny < 100) goto L_Trade_Missing; inventoryplace Lifestone, 1; - delitem "BugLeg", 3; - delitem "MaggotSlime", 5; + delitem BugLeg, 3; + delitem MaggotSlime, 5; set Zeny, Zeny - 100; getitem Lifestone, 1; + goto L_TradeOK; + +L_TradeInput: + mesc l("How many?"); + input .@am; + if (.@am <= 0) + close; + + if (countitem(BugLeg) < 3*.@am) goto L_Trade_Missing; + if (countitem(MaggotSlime) < 5*.@am) goto L_Trade_Missing; + if (Zeny < 100*.@am) goto L_Trade_Missing; + + inventoryplace Lifestone, 1*.@am; + delitem BugLeg, 3*.@am; + delitem MaggotSlime, 5*.@am; + set Zeny, Zeny - 100*.@am; + + getitem Lifestone, 1*.@am; + goto L_TradeOK; + +L_TradeOK: mes ""; // Only grant Experience on first craft @@ -70,14 +94,11 @@ L_Trade: mesq l("I guess that you could use these lifestones to gain a regeneration effect, too, but I do not know how."); next; mes l("She smiles."); - goto L_Close; + close; L_Trade_Missing: mesn; mesq l("This is not what I asked for."); - goto L_Close; - -L_Close: close; OnInit: -- cgit v1.2.3-70-g09d2