From 8c6010c3e901ae2b5f605d7ff16ddbda7a2e239a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 29 May 2018 09:28:09 -0300 Subject: Rewrite Jhedia again, so she can take care of all ore we have. --- npc/003-8/jhedia.txt | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'npc') diff --git a/npc/003-8/jhedia.txt b/npc/003-8/jhedia.txt index c1280e368..3a8d3c1ee 100644 --- a/npc/003-8/jhedia.txt +++ b/npc/003-8/jhedia.txt @@ -5,8 +5,10 @@ // Jesusalva // Description: // Jhedia takes care of Tulimshar forge and makes ingots +//.@karim = getq(Karim_Quest); 003-8,28,30,0 script Jhedia NPC_ELVEN_FEMALE,{ + goto L_Menu; // ingot_create( BaseItem, PrizeItem, Amount, Amount_Coal, Price ) function ingot_create { @@ -15,6 +17,17 @@ .@amoun=getarg(2); .@coalm=getarg(3); .@price=getarg(4); + + mesn; + mesq l("Do you want to craft @@? For that I will need @@ @@, @@ @@ and @@ gp.", + getitemlink(.@prize), .@amoun, getitemlink(.@basei), .@coalm, getitemlink(Coal), .@price); + + select + l("Yes"), + menuaction(l("Quit")); + + if (@menu == 2) goto L_Menu; + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("How many ingots do you want to make?"); input .@amount; @@ -38,22 +51,13 @@ } +L_Menu: mesn; mesq l("Hello! I am @@, and I take care of Tulimshar forge. I usually make ingots from various materials. So, what do you want today?"); next; - menu - l("Iron Ingots"), L_Iron, - l("Nothing, thanks."), L_Close; - -L_Iron: - .@price=8500; // Bad, duplicate - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Hello! Do you want to craft @@? For that I will need 7 @@, 11 @@ and @@ gp.", getitemlink(IronIngot),getitemlink(IronOre),getitemlink(Coal),.@price); - - //.@karim = getq(Karim_Quest); select - l("Yes"), - menuaction(l("Quit")); + l("Iron Ingot"), + l("Nothing, thanks."); switch (@menu) { case 1: -- cgit v1.2.3-60-g2f50