summaryrefslogtreecommitdiff
path: root/npc/017-5
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-07-31 12:07:02 -0300
committerJesusaves <cpntb1@ymail.com>2018-07-31 12:07:02 -0300
commit6b551d5ff145a2cdb21b1bd289241ea4d726529a (patch)
treef19faef08462124fd56d42d9287715804ca74b23 /npc/017-5
parent426b1ca787b1492afef540110c6342f4970bd958 (diff)
downloadserverdata-6b551d5ff145a2cdb21b1bd289241ea4d726529a.tar.gz
serverdata-6b551d5ff145a2cdb21b1bd289241ea4d726529a.tar.bz2
serverdata-6b551d5ff145a2cdb21b1bd289241ea4d726529a.tar.xz
serverdata-6b551d5ff145a2cdb21b1bd289241ea4d726529a.zip
Silversmith
Diffstat (limited to 'npc/017-5')
-rw-r--r--npc/017-5/_import.txt1
-rw-r--r--npc/017-5/silversmith.txt87
2 files changed, 88 insertions, 0 deletions
diff --git a/npc/017-5/_import.txt b/npc/017-5/_import.txt
index 3c5b312d2..ac4bb9e62 100644
--- a/npc/017-5/_import.txt
+++ b/npc/017-5/_import.txt
@@ -2,3 +2,4 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/017-5/_warps.txt",
"npc/017-5/nahrec.txt",
+"npc/017-5/silversmith.txt",
diff --git a/npc/017-5/silversmith.txt b/npc/017-5/silversmith.txt
new file mode 100644
index 000000000..d57d8ed01
--- /dev/null
+++ b/npc/017-5/silversmith.txt
@@ -0,0 +1,87 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// Crafts silver objects
+
+017-5,24,25,0 script Silversmith NPC_SILVERSMITH,{
+ goto L_Menu;
+
+ // 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:", getitemlink(.@prize));
+ mesc l("@@/@@ @@", countitem(.@base1), .@amon1, getitemlink(.@base1));
+ mesc l("@@/@@ @@", countitem(.@base2), .@amon2, getitemlink(.@base2));
+ mesc l("@@/@@ GP", format_number(Zeny), format_number(.@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;
+ .@xp=getiteminfo(.@base1, ITEMINFO_SELLPRICE)*.@amon1+getiteminfo(.@base2, ITEMINFO_SELLPRICE)*.@amon2;
+ getexp .@xp, rand(1,10);
+
+ 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;
+ }
+
+
+L_Menu:
+ mesn l("Smith Silvers");
+ mesq l("Hello, I am your local silversmith, here for all of your smithing needs!");
+ next;
+ select
+ l("Nothing, sorry!"),
+ l("I'd like my Crozenite Clover Silvered.")
+ l("Silver Ring!"),
+ l("Miere Cleaver!"),
+ l("Broadsword!");
+
+ switch (@menu) {
+ case 2:
+ blacksmith_create(SilverIngot, 3, CrozeniteFourLeafAmulet, 1, SilverFourLeafAmulet, 5000);
+ break;
+ case 3:
+ blacksmith_create(SilverIngot, 4, TinIngot, 2, SilverRing, 10000);
+ break;
+ case 4:
+ blacksmith_create(SilverIngot, 12, Coal, 8, MiereCleaver, 20000);
+ break;
+ case 5:
+ blacksmith_create(SilverIngot, 27, Coal, 20, BroadSword, 50000);
+ break;
+ }
+ close;
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+