summaryrefslogtreecommitdiff
path: root/npc/012-4
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-05-23 18:22:48 -0300
committerJesusaves <cpntb1@ymail.com>2019-05-23 18:22:48 -0300
commit48d029a3969192d0a5e5a082d9ed59ba0f09297c (patch)
treeb3699fc95fc79497c574504124bfc46cdb2fa25d /npc/012-4
parentf232ceb0dc8b7b1f07c0eae152ed0393a35c0c09 (diff)
downloadserverdata-48d029a3969192d0a5e5a082d9ed59ba0f09297c.tar.gz
serverdata-48d029a3969192d0a5e5a082d9ed59ba0f09297c.tar.bz2
serverdata-48d029a3969192d0a5e5a082d9ed59ba0f09297c.tar.xz
serverdata-48d029a3969192d0a5e5a082d9ed59ba0f09297c.zip
Allow players to make Return Potion, and give them Tulimshar Crystal instead
of Halinarzo Crystal. It'll be more fun by crossing the canyons \o/
Diffstat (limited to 'npc/012-4')
-rw-r--r--npc/012-4/wyara.txt74
1 files changed, 73 insertions, 1 deletions
diff --git a/npc/012-4/wyara.txt b/npc/012-4/wyara.txt
index 2d95b9461..f4a7680b5 100644
--- a/npc/012-4/wyara.txt
+++ b/npc/012-4/wyara.txt
@@ -4,7 +4,7 @@
// Vasily_Makarov (original from Evol)
// Jesusalva
// Description:
-// Still Unused NPC
+// Hurnscald Potion Shopkeeper
// Notes:
// Reset must be turned in function
@@ -20,10 +20,13 @@ L_Menu:
if (BaseLevel > 10)
.@plush_count = .@plush_count/(BaseLevel/10);
+ .@n=getq(General_Narrator);
+
select
l("Can you reset my stats please?"),
rif($ARKIM_ST >= 1200,l("I want Piberries Infusion!")),
rif(getq(HurnscaldQuest_InjuriedMouboo) == 2,l("Do you know how to break curses?")),
+ rif(.@n >= 6,l("I am in dire need of Return Potions!")),
lg("You are weird, I have to go sorry.");
mes "";
@@ -35,6 +38,8 @@ L_Menu:
case 3:
goto L_Uncurse;
case 4:
+ goto L_ReturnPot;
+ case 5:
goto L_Quit;
}
@@ -142,6 +147,73 @@ L_Uncurse:
}
close;
+L_ReturnPot:
+ .@price=10000-(reputation("Hurns")*20);
+ .@craft=2001-(reputation("Hurns")*20);
+ mesn;
+ mesq l("I understand. Rakinorf told me to stuff you with them if needed.");
+ next;
+ mesn;
+ mesq l("Be aware I can only bake batches of 5 potions.");
+ next;
+ mesn;
+ mesq l("So, it is @@ GP each one up-front. Or I can brew with your materials:", .@price);
+ mes "";
+ mesn l("Craft Recipe");
+ mesc l("- @@/@@ @@", 100, countitem(MauveHerb), getitemlink(MauveHerb));
+ mesc l("- @@/@@ @@", 20, countitem(MushroomSpores), getitemlink(MushroomSpores));
+ mesc l("- @@/@@ @@", 10, countitem(Potatoz), getitemlink(Potatoz));
+ mesc l("- @@/@@ @@", 10, countitem(Coral), getitemlink(Coral));
+ mesc l("- @@/@@ @@", 1, countitem(EverburnPowder), getitemlink(EverburnPowder));
+ mesc l("- @@/@@ GP", format_number(.@craft), format_number(Zeny));
+ next;
+ select
+ l("Too expensive %%n"),
+ rif(Zeny >= .@price, l("I want to pay the full price.")),
+ l("I want you to brew some for me.");
+ mes "";
+ switch (@menu) {
+ case 1:
+ close;
+ case 2:
+ mesc l("How many? Max. @@", (Zeny/.@price));
+ input .@c, 0, (Zeny/.@price);
+ .@payment=.@price*.@c;
+ if (Zeny >= .@payment) {
+ inventoryplace ReturnPotion, .@c*5;
+ Zeny-=.@payment;
+ getitem ReturnPotion, .@c*5;
+ mesn;
+ mesq l("There you go!");
+ } else {
+ Exception("Illegal input.", RB_DEFAULT | RB_SPEECH);
+ }
+ break;
+ case 3:
+ mesc l("How many?");
+ input .@c, 0, 100;
+ inventoryplace ReturnPotion, .@c*5;
+ if (
+ countitem(MauveHerb) < 100*.@c ||
+ countitem(MushroomSpores) < 20*.@c ||
+ countitem(Potatoz) < 10*.@c ||
+ countitem(Coral) < 10*.@c ||
+ countitem(EverburnPowder) < 1*.@c ||
+ Zeny < .@craft*.@c
+ ) Exception("You don't have that much material.", RB_ISFATAL|RB_SPEECH);
+ delitem MauveHerb, 100*.@c;
+ delitem MushroomSpores, 20*.@c;
+ delitem Potatoz, 10*.@c;
+ delitem Coral, 10*.@c;
+ delitem EverburnPowder, 1*.@c;
+ Zeny-=.@craft*.@c;
+ getitem ReturnPotion, .@c*5;
+ mesn;
+ mesq l("There you go!");
+ break;
+ }
+ close;
+
L_Quit:
goodbye;
close;