// Evol scripts.
// Author:
// Reid
// Description:
// Newbie merchant.
// Variables:
// ArtisQuests_Fexil
// Quest states:
// 0 -- not started
// 1 -- Lloyd warned about the quest
// 2 -- Fexil explain what he needs
// 3 -- Fexil buy every fur that the pc bring to him
001-1,47,134,0 script Fexil#001-1 NPC_ELVEN_MAN_TRADER,{
function fexil_quest {
speech S_LAST_NEXT,
l("You know, the life of the merchant is hard. I really hope that Artis and the Merchant Guild will help me to succeed."),
l("Maybe you too you could help me?"),
l("I want to be the first merchant of this square to sell clothes made from @@s!", getitemlink(FluffyFur)),
l("I will buy all of the fur that you will bring me at a good price, let's say, 15 E piece."),
l("Do we have a deal?");
switch (select(l("Ok."), l("I don't want to be part of this joke.")))
{
case 1:
setq ArtisQuests_Fexil, 3;
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("Awesome! I will wait for you here.");
break;
case 2:
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("Oh... Ok, I will be around here if you change your mind.");
break;
}
return;
}
mesn;
mesq lg("Greetings traveler.");
next;
mesq l("I have some clothes and other things for you at a fine price!");
next;
mesq l("What I sell comes from every corner of Gasaron.");
next;
mesq lg("Interested?");
next;
if (getq(ArtisQuests_Fexil) == 1)
{
select(l("I have your pass from the Merchant Guild."));
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("Oh! You saved me, I was too afraid to unpack my stuff without this pass."),
l("Hey, I remember you, we were on the same boat, you are the castaway.");
switch (select(l("Yes I am."),
l("You're confusing me with someone else.")))
{
case 1:
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("Oh sure I remember you."),
l("The travel was fine for you? It was terrible for me, I was sea-sick.");
break;
case 2:
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("Ah, I didn't have much sleep, it's possible.");
break;
}
setq ArtisQuests_Fexil, 2;
fexil_quest;
closedialog;
goodbye;
close;
}
.@fexil = getq(ArtisQuests_Fexil);
select
l("OK, let's trade."),
rif(.@fexil == 2, l("Do you still need help?")),
rif(.@fexil > 2 && countitem(FluffyFur) > 0, l("I have some fur for you.")),
l("No. Sorry.");
switch (@menu)
{
case 1:
closedialog;
shop "Bag#001-1";
close;
case 2:
mes "";
fexil_quest;
break;
case 3:
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("Awesome. How many of those do you want to give me?");
do
{
input .@amount;
if (.@amount < 1)
{
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("Please enter a valid amount.");
continue;
}
if (.@amount > countitem(FluffyFur))
{
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("You don't have enough @@s on you.", getitemlink(FluffyFur));
continue;
}
break;
} while (1);
.@price = 15 * .@amount;
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("Deal, I offer you @@ E!", .@price);
delitem FluffyFur, .@amount;
Zeny = Zeny + .@price;
break;
case 4:
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("Oh... Well, I just started to trade... Thus my technique may not be the best."),
lg("Anyway, if you ever feel interested, just check my bag!");
break;
}
closedialog;
goodbye;
close;
OnInit:
.sex = G_MALE;
.distance = 2;
end;
}