From af1116c1d1a845771cedc8398fefac14a51ce278 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 13 Jul 2018 18:13:00 -0300 Subject: [skip ci] just some stuff for Nahrec. Don't worry ¬.¬ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- npc/017-5/nahrec.txt | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/npc/017-5/nahrec.txt b/npc/017-5/nahrec.txt index 8be80c597..54ea9044a 100644 --- a/npc/017-5/nahrec.txt +++ b/npc/017-5/nahrec.txt @@ -8,6 +8,45 @@ // TODO: Mylarin Dust for THE EPISODE. This means Savior Pants is part of THE EPISODE 017-5,0,0,0 script Nahrec NPC_PLAYER,{ + // blacksmith_create( BaseItem1, Amount, BaseItem2, Amount, PrizeItem, Price ) + function blacksmith_create { + .@base1=getarg(0); + .@amon1=getarg(1); + .@base2=getarg(2); + .@amon2=getarg(3); + .@prize=getarg(4); + .@price=getarg(5); + + mesn; + mesq l("Do you want to craft @@? For that I will need @@ @@, @@ @@ and @@ gp.", + getitemlink(.@prize), .@amon1, getitemlink(.@base1), .@amon2, getitemlink(.@base2), .@price); + + select + l("Yes"), + l("No"); + + if (@menu == 2) + return; + + if (countitem(.@base1) >= .@amon1 && + countitem(.@base2) >= .@amon2 && + Zeny >= .@price) { + inventoryplace .@prize, 1; + delitem .@base1, .@amon1; + delitem .@base2, .@amon2; + Zeny = Zeny - .@price; + getitem .@prize, 1; + + mes ""; + mesn; + mesq l("Many thanks! Come back soon."); + } else { + speech S_FIRST_BLANK_LINE,// | S_LAST_NEXT, + l("You don't have enough material, sorry."); + } + return; + } + mesn; mesq l("Ah, hello! It is good to see another traveler in this town!"); next; @@ -42,6 +81,18 @@ L_Makestuff: l("Nevermind, bye!"); mes ""; switch (@menu) { + case 1: + blacksmith_create(GoldIngot, 35, WarlordPlate, 1, GoldenWarlordPlate, 200000); + break; + case 2: + blacksmith_create(GoldIngot, 10, LightPlatemail, 1, GoldenLightPlatemail, 30000); + break; + case 3: + blacksmith_create(IronIngot, 15, SilverIngot, 5, LightPlatemail, 10000); + break; + case 4: + blacksmith_create(IronIngot, 5, GoldenLightPlatemail, 1, WarlordPlate, 5000); + break; case 5: goto L_Savior; case 6: -- cgit v1.2.3-60-g2f50