summaryrefslogtreecommitdiff
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
parent426b1ca787b1492afef540110c6342f4970bd958 (diff)
downloadserverdata-6b551d5ff145a2cdb21b1bd289241ea4d726529a.tar.gz
serverdata-6b551d5ff145a2cdb21b1bd289241ea4d726529a.tar.bz2
serverdata-6b551d5ff145a2cdb21b1bd289241ea4d726529a.tar.xz
serverdata-6b551d5ff145a2cdb21b1bd289241ea4d726529a.zip
Silversmith
-rw-r--r--db/re/item_db.conf4
-rw-r--r--npc/00000SAVE/smiths/009-1_silversmith.txt126
-rw-r--r--npc/017-5/_import.txt1
-rw-r--r--npc/017-5/silversmith.txt87
4 files changed, 90 insertions, 128 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index 260a06a83..9b3a75e9b 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -4496,8 +4496,8 @@ item_db: (
},
{
Id: 1001
- AegisName: "IronFourLeafAmulet"
- Name: "Iron Four-Leaf Amulet"
+ AegisName: "SilverFourLeafAmulet"
+ Name: "Silver Four-Leaf Amulet"
Type: "IT_ARMOR"
Buy: 40000
Sell: 6000
diff --git a/npc/00000SAVE/smiths/009-1_silversmith.txt b/npc/00000SAVE/smiths/009-1_silversmith.txt
deleted file mode 100644
index 5f9e9e23b..000000000
--- a/npc/00000SAVE/smiths/009-1_silversmith.txt
+++ /dev/null
@@ -1,126 +0,0 @@
-// TODO: Silversmith on 24, 25
-
-017-5,24,25,0 script Silversmith NPC135,{
-
- mesn "Smith Silvers";
- mes "\"Hello, I am your local silversmith, here for all of your smithing needs!\"";
- goto L_Smithmenu;
-
-L_Smithmenu:
- menu
- "Can you smith my Short Sword?", L_Sword,
- "How about a Crusade Helmet?", L_Helm,
- "Can you silver my Forest Bow?", L_Bow,
- "I'd like my Clover Silvered.", L_Clover,
- "I think I have everything I need, thanks.", L_close;
-
-L_Sword:
- mesn "Smith Silvers";
- mes "\"I can, it will cost you 9 Silver Ore, 5 Raw Coal, and 40,000 gp.\"";
- menu
- "Sure.", L_sword2,
- "What a ripoff! No way!", L_close;
-
-L_Helm:
- mesn "Smith Silvers";
- mes "\"I can silver that helmet for 6 Silver Ore, 9 Raw coal, and 50,000 gp.\"";
- menu
- "Here you go.", L_helm2,
- "Are you nuts?! Forget it!", L_close;
-
-L_Bow:
- mesn "Smith Silvers";
- mes "\"I can silver that bow for 18 Silver Ore, 18 Raw Coal, and 200,000 gp.\"";
- menu
- "Sure.", L_bow2,
- "Whoa, that's way too much.", L_close;
-
-L_Clover:
- mesn "Smith Silvers";
- mes "\"I can silver your clover for 4 Silver Ore, 5 Raw Coal, and 50,000 gp.\"";
- menu
- "I have them right here.", L_Clover2,
- "Whoa, that's way too much.", L_close;
-
-L_sword2:
- if (countitem("SilverOre") < 9) goto L_Missing;
- if (countitem("RawCoal") < 5) goto L_Missing;
- if (countitem("ShortSword") < 1) goto L_Missing;
- if (Zeny < 40000) goto L_NotEnoughMoney;
- delitem "SilverOre", 9;
- delitem "RawCoal", 5;
- delitem "ShortSword", 1;
- Zeny = Zeny - 40000;
- getitem "SilverSword", 1;
- mesn "Smith Silvers";
- mes "\"There you go! Want me to silver anything else?\"";
- menu
- "Yes.", L_Smithmenu,
- "Nope.", L_No;
-
-L_helm2:
- if (countitem("SilverOre") < 6) goto L_Missing;
- if (countitem("RawCoal") < 9) goto L_Missing;
- if (countitem("UnsilveredCrusadeHelmet") < 1) goto L_Missing;
- if (Zeny < 50000) goto L_NotEnoughMoney;
- delitem "RawCoal", 9;
- delitem "SilverOre", 6;
- delitem "UnsilveredCrusadeHelmet", 1;
- Zeny = Zeny - 50000;
- getitem "CrusadeHelmet", 1;
- mesn "Smith Silvers";
- mes "\"There you go. Would you like anything else silvered?\"";
- menu
- "Yes.", L_Smithmenu,
- "No.", L_No;
-
-L_bow2:
- if (countitem("SilverOre") < 18) goto L_Missing;
- if (countitem("RawCoal") < 18) goto L_Missing;
- if (countitem("ForestBow") < 1) goto L_Missing;
- if (Zeny < 200000) goto L_NotEnoughMoney;
- delitem "RawCoal", 18;
- delitem "SilverOre", 18;
- delitem "ForestBow", 1;
- Zeny = Zeny - 200000;
- getitem "SilverBow", 1;
- mesn "Smith Silvers";
- mes "\"There you go. Would you like anything else silvered?\"";
- menu
- "Yes.", L_Smithmenu,
- "No.", L_No;
-
-L_Clover2:
- if (countitem("SilverOre") < 4) goto L_Missing;
- if (countitem("RawCoal") < 5) goto L_Missing;
- if (countitem("FourLeafClover") < 1) goto L_Missing;
- if (Zeny < 50000) goto L_NotEnoughMoney;
- delitem "RawCoal", 5;
- delitem "SilverOre", 4;
- delitem "FourLeafClover", 1;
- Zeny = Zeny - 50000;
- getitem "SilverFourLeafAmulet", 1;
- mesn "Smith Silvers";
- mes "\"There you go. Would you like anything else silvered?\"";
- menu
- "Yes.", L_Smithmenu,
- "No.", L_No;
-
-L_Missing:
- mesn "Smith Silvers";
- mes "\"It looks like you're missing some items. Please come back when you have what I need!\"";
- goto L_close;
-
-L_NotEnoughMoney:
- mesn "Smith Silvers";
- mes "\"You don't have enough money, come back later!\"";
- goto L_close;
-
-L_No:
- mesn "Smith Silvers";
- mes "\"Have a great day!\"";
- goto L_close;
-
-L_close:
- close;
-}
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;
+}
+