From 4886a23a484b9d3e1bf7deb783eb05c79474c1c1 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 19 Mar 2019 11:16:02 -0300 Subject: Leona, the only Fairy at Lilit currently. Part of a TBD quest. She lets you sell snake's skin based items for 20% more. --- npc/018-5-2/_import.txt | 1 + npc/018-5-2/leona.txt | 106 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 npc/018-5-2/leona.txt (limited to 'npc/018-5-2') diff --git a/npc/018-5-2/_import.txt b/npc/018-5-2/_import.txt index 9835e17fe..ef18d80a9 100644 --- a/npc/018-5-2/_import.txt +++ b/npc/018-5-2/_import.txt @@ -1,3 +1,4 @@ // Map 018-5-2: Indoors // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/018-5-2/_warps.txt", +"npc/018-5-2/leona.txt", diff --git a/npc/018-5-2/leona.txt b/npc/018-5-2/leona.txt new file mode 100644 index 000000000..ffb866ae1 --- /dev/null +++ b/npc/018-5-2/leona.txt @@ -0,0 +1,106 @@ +// TMW2/LoF scripts. +// Authors: +// TMW BR Team +// Jesusalva +// Description: +// Exchanges Mountain Snake Plate (TBD) for a Nymph Necklace (TBD) +// Grand Hunter Quest + +018-5-2,33,36,0 script Leona NPC_FAIRY_B,{ + function leona_exchange; + mesn; + mesq l("Hello, @@!", get_race()); + next; + mesn; + mesq l("Do you have something to exchange with me? Or perhaps you want a Grand Hunter Quest?"); + next; + select + l("I've brought something to exchange."), + l("I'm interested in Grand Hunter Quest."), + l("Ops, sorry. I was going to the Soul Menhir and entered your house by accident."); + mes ""; + switch (@menu) { + case 3: + mesn; + mesq l("It happens."); + close; + case 2: + GHQ_Assign(MountainSnake, "Lilit"); + close; + case 1: + mesn; + mesq l("The most famous nymphs, are those who wear stuff made of Snake Skin."); + next; + mesn; + mesq l("Perhaps you have something like that?"); + next; + do + { + mesc l("What to exchange with Leona?"); + mes "##B" + l("Drag and drop an item from your inventory.") + "##b"; + + .@id = requestitem(); + + // If ID is invalid, there's not enough items or if it is bound + if (.@id < 1) close; + if (countitem(.@id) < 1) close; + if (checkbound(.@id)) + { + mesc l("You cannot part with this item!"); + continue; + } + + // TODO: Check if item is OK + switch (.@id) { + + // Generic Exchange + case LeatherShirt: + case LeatherBoots: + case LeatherGloves: + case JeansChaps: + case LeatherTrousers: + case SnakeSkin: + case MountainSnakeSkin: + case CaveSnakeSkin: + case BlackMambaSkin: + leona_exchange(.@id, 0); + default: + mesn; + mesq l("I have no interest on this item."); + next; + break; + } + + } while (true); + } + close; + + // leona_exchange ( give, receive ) + // Receive should be item ID. If it is 0, you will get 1.2× the sell price + function leona_exchange { + .@what=getarg(0); + .@reward=getarg(1); + if (!.@reward) + .@gp=getiteminfo(.@what, ITEMINFO_SELLPRICE)*12/10; + mesn; + if (.@reward) + mesq l("For this @@, I offer you a(n) @@.", getitemlink(.@what), getitemlink(.@reward)); + else + mesq l("For this @@, I offer you @@ GP.", getitemlink(.@what), format_number(.@gp)); + next; + mesc l("Exchange the item with Leona?"); + if (askyesno() == ASK_YES) + { + delitem .@what, 1; + if (.@reward) + getitem .@reward, 1; + else + Zeny+=.@gp; + mesn; + mesq l("Many thanks! I'll be sooooo fashionable now!"); + next; + } + return; + } + +} -- cgit v1.2.3-70-g09d2