summaryrefslogtreecommitdiff
path: root/npc/017-5
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-10-23 21:44:22 -0300
committerJesusaves <cpntb1@ymail.com>2022-10-23 21:44:22 -0300
commita7c45a192268da2601cef47a4cdba987ae2327ca (patch)
treec5fb5b97db109fe7106496dd96498c475881046b /npc/017-5
downloadserverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.gz
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.bz2
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.xz
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.zip
Initial commit (Moubootaur Legends fork)
Diffstat (limited to 'npc/017-5')
-rw-r--r--npc/017-5/_import.txt6
-rw-r--r--npc/017-5/_warps.txt3
-rw-r--r--npc/017-5/nahrec.txt219
-rw-r--r--npc/017-5/silversmith.txt91
-rw-r--r--npc/017-5/vault.txt20
5 files changed, 339 insertions, 0 deletions
diff --git a/npc/017-5/_import.txt b/npc/017-5/_import.txt
new file mode 100644
index 0000000..26bd1dd
--- /dev/null
+++ b/npc/017-5/_import.txt
@@ -0,0 +1,6 @@
+// Map 017-5: LoF Weapon Smith & Shop
+// 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",
+"npc/017-5/vault.txt",
diff --git a/npc/017-5/_warps.txt b/npc/017-5/_warps.txt
new file mode 100644
index 0000000..df29132
--- /dev/null
+++ b/npc/017-5/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 017-5: LoF Weapon Smith & Shop warps
+017-5,23,34,0 warp #017-5_23_34 0,0,017-1,133,156
diff --git a/npc/017-5/nahrec.txt b/npc/017-5/nahrec.txt
new file mode 100644
index 0000000..b2b3c71
--- /dev/null
+++ b/npc/017-5/nahrec.txt
@@ -0,0 +1,219 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// General Purpose Blacksmith
+// TODO: Silversmith on 24, 25
+
+017-5,44,24,0 script Nahrec NPC_PLAYER,{
+ function blacksmith_create;
+ function NahrecStory;
+ function NahrecMain;
+ function NahrecEnd;
+ function NahrecSavior;
+ function Mylarin;
+
+ mesn;
+ mesq l("Almost there! The War Lord will be proud with this new armor I am inventing for him! Just a little more...!");
+ next;
+
+ mesn;
+ mesq l("Ah, hello! It is good to see another traveler in this town!");
+ next;
+ select
+ l("Really? Where are you from?"),
+ l("It's good to see you too, do you happen to be able to make stuff?"),
+ l("Alright.");
+ mes "";
+ if (@menu == 1)
+ NahrecStory();
+ if (@menu == 2) // Changed by option 1, do not use a switch
+ NahrecMain();
+ NahrecEnd(); // changed by option 2, do not use a switch
+
+function NahrecEnd {
+ closedialog;
+ goodbye;
+ close;
+}
+
+function NahrecStory {
+ mesn;
+ mesq l("I came from Thermin, a town far far away.");
+ next;
+ mesn;
+ mesq l("I'm an experienced weapon master helping this smithy here, but I am new in this town. I am best at smithing armor.");
+ next;
+ select
+ l("Good to know."),
+ l("'Best'? So you can make other things?");
+ return;
+}
+
+function NahrecMain {
+ do
+ {
+ mesn;
+ mesq l("Yes, I can craft many things. In addition to plating and improving armor, I can craft smaller items made of gold and other metals.");
+ select
+ rif(!RECIPES_EQUIPMENT[CraftGoldenLightPlatemail], l("Can you improve my Light Platemail for me?")),
+ rif(!RECIPES_EQUIPMENT[CraftGoldenWarlordPlate], l("Can you improve my Warlord Plate for me?")),
+ l("Can you craft Chainmail?"),
+ l("Can you craft Light Platemail?"),
+ l("Can you craft Warlord Plate?"),
+ rif(countitem(MylarinDust) && !NAHREC_RECIPE, l("Can you craft Savior Equipment?")),
+ l("Can you craft Chainmail Skirt?"),
+ l("Do you know something about 'Mylarin Dust'?"),
+ l("Nevermind, bye!");
+ mes "";
+ switch (@menu) {
+ case 1:
+ mesn;
+ mesq l("For %d GP I'll teach you, do we have a deal?", fnum(30000));
+ next;
+ if (askyesno() == ASK_YES && Zeny > 30000) {
+ mes "";
+ Zeny-=30000;
+ RECIPES_EQUIPMENT[CraftGoldenLightPlatemail]=true;
+ mesn;
+ mesc l("Nahrec discretly gives you a recipe.");
+ mesc l("\"*psst, just follow what is outlined here to make it golden.*\"");
+ }
+ break;
+ case 2:
+ mesn;
+ mesq l("For %d GP I'll teach you, do we have a deal?", fnum(200000));
+ next;
+ if (askyesno() == ASK_YES && Zeny > 200000) {
+ mes "";
+ Zeny-=200000;
+ RECIPES_EQUIPMENT[CraftGoldenWarlordPlate]=true;
+ mesn;
+ mesc l("Nahrec discretly gives you a recipe.");
+ mesc l("\"*psst, just follow what is outlined here to make it golden.*\"");
+ }
+ break;
+ break;
+ case 3:
+ blacksmith_create(IronIngot, 10, SilverIngot, 2, Chainmail, 20000);
+ break;
+ case 4:
+ blacksmith_create(IronIngot, 15, SilverIngot, 5, LightPlatemail, 40000);
+ break;
+ case 5:
+ blacksmith_create(IronIngot, 5, GoldenLightPlatemail, 1, WarlordPlate, 5000);
+ break;
+ case 6:
+ NahrecSavior();
+ case 7:
+ blacksmith_create(IronIngot, 10, SilverIngot, 15, ChainmailSkirt, 35000);
+ break;
+ case 8:
+ Mylarin();
+ case 9:
+ return;
+ }
+ } while (true);
+ return;
+}
+
+function Mylarin {
+ mesn;
+ mesq l("Mylarin dust?! Where would you get that? That's amazing!");
+ next;
+ mesq l("It has eluded so many craftsmiths, who knows what can be done with that!");
+ next;
+ mesq l("I can make some stuff with it, but I have no idea where it can be found. Mylarin dust... amazing.");
+ next;
+ return;
+}
+
+function NahrecSavior {
+ if (NAHREC_RECIPE) end;
+ mesn;
+ mesq l("Yes, I can craft Savior Pants. But it is not cheap. I'll need Platinum, Iridium, and Mylarin Dust. And gold. Much gold.");
+ next;
+ mesn;
+ mesq l("But you already have Mylarin Dust! That's good, because I no longer craft savior pieces. But. For %s GP I'll give you a %s and if you're lucky, it'll have the recipe you're after.", fnum(50000), getitemlink(SaviorBlueprint));
+ mes "";
+ if (Zeny < 50000) return;
+ next;
+ select
+ l("Alright, I'll pay."),
+ l("I'm a bit short in cash right now.");
+ mes "";
+ if (@menu == 2) return;
+ inventoryplace SaviorBlueprint, 1;
+ Zeny -= 50000;
+ NAHREC_RECIPE = true;
+ getitem SaviorBlueprint, 1;
+ mesn;
+ mesq l("Deal. Pleasure doing business with you.");
+ next;
+ return;
+}
+
+// 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);
+
+ .@price=POL_AdjustPrice(.@price);
+
+ 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;
+ POL_PlayerMoney(.@price);
+ if (.@prize == WarlordPlate) {
+ .@b=any(IOPT_SPLASHDAMAGE, VAR_ITEMDEFPOWER);
+ if (.@b == IOPT_SPLASHDAMAGE)
+ CsysNpcCraft(.@prize, .@b, 1);
+ else
+ CsysNpcCraft(.@prize, VAR_ITEMDEFPOWER, rand2(50), VAR_MDEFPOWER, 30);
+ } else {
+ CsysNpcCraft(.@prize, IOPT_SCRESIST_POISON, 10, IOPT_SCRESIST_SILENCE, 10, IOPT_SCRESIST_BLIND, 10, IOPT_SCRESIST_CURSE, 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;
+}
+
+OnInit:
+ .@npcId = getnpcid(.name$);
+ setunitdata(.@npcId, UDT_HEADTOP, FancyHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, WarlordPlate);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
+ setunitdata(.@npcId, UDT_WEAPON, SaviorPants);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 4);
+
+ .sex=G_MALE;
+ .distance=5;
+ end;
+
+}
diff --git a/npc/017-5/silversmith.txt b/npc/017-5/silversmith.txt
new file mode 100644
index 0000000..6255ee6
--- /dev/null
+++ b/npc/017-5/silversmith.txt
@@ -0,0 +1,91 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// Crafts silver objects
+
+017-5,24,25,0 script Silversmith NPC_SILVERSMITH,{
+ showavatar 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);
+
+ .@price=POL_AdjustPrice(.@price);
+
+ 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;
+ POL_PlayerMoney(.@price);
+ getitem .@prize, 1;
+ .@xp=getiteminfo(.@base1, ITEMINFO_SELLPRICE)*.@amon1+getiteminfo(.@base2, ITEMINFO_SELLPRICE)*.@amon2;
+ .@xp=.@xp*2/3;
+ 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, 500);
+ break;
+ case 3:
+ blacksmith_create(SilverIngot, 4, TinIngot, 2, SilverRing, 1000);
+ break;
+ case 4:
+ blacksmith_create(SilverIngot, 12, Coal, 8, MiereCleaver, 8000);
+ break;
+ case 5:
+ blacksmith_create(SilverIngot, 27, Coal, 20, Broadsword, 15000);
+ break;
+ }
+ close;
+
+OnInit:
+ .sex=G_MALE;
+ .distance=5;
+ end;
+}
+
diff --git a/npc/017-5/vault.txt b/npc/017-5/vault.txt
new file mode 100644
index 0000000..2b85756
--- /dev/null
+++ b/npc/017-5/vault.txt
@@ -0,0 +1,20 @@
+// TMW2/LoF Script.
+// Author:
+// Jesusalva
+// Notes:
+// Based on BenB idea.
+
+017-5,53,26,0 script Vault#0175 NPC_NO_SPRITE,{
+ LootableVault(1, 5, "0175");
+ close;
+
+OnInit:
+ .distance=3;
+ end;
+
+OnClock0202:
+OnClock1419:
+ $VAULT_0175+=rand2(21,36);
+ end;
+}
+