// Evol scripts.
// Authors:
// Toams
// Description:
// Melinda, Rusty Pick's waitress
008-2-2,40,29,0 script Melinda#008-2-2 NPC_MELINDA,1,1,{
function StartConversation {
.@tick = gettimetick(1);
if (.@tick > @Hurns_Rusty_Pick_WaitressTick + 10)
{
setarray .messages$[0], l("Welcome to our inn!"),
l("Welcome to the Rusty Pick."),
l("Please, have a seat."),
l("Lovely day, isn't it?");
.@r = rand(getarraysize(.messages$));
.@msg$ = .messages$[.@r];
npctalk3 .@msg$;
@Hurns_Rusty_Pick_WaitressTick = .@tick;
}
}
function face_to_PC {
getmapxy(.@map$, .@cx, .@cy, 0);
@Melinda_ols_dir = .dir;
npc_turntoxy(.@cx, .@cy);
return;
}
npc_pausemove;
face_to_PC;
mes "";
mesn;
mesq l("Hi, sweetie! Want a fresh beer for 90 Florin?");
switch (select(l("Sure! [Don't tip]"),
l("Sure! [Tip 5 Florin]"),
l("Sure! [Tip 10 Florin]"),
l("Nah, maybe later.")))
{
case 1:
if (Zeny < 90)
goto L_NoMoney;
getinventorylist;
if (@inventorylist_count == 100 && countitem("Beer") == 0)
goto L_TooMany;
Zeny -= 90;
getitem Beer, 1;
mes "";
mesn;
mesq l("Pff... Nickel nurser!");
goto L_Close;
case 2:
if (Zeny < 95)
goto L_NoMoney;
getinventorylist;
if (@inventorylist_count == 100 && countitem("Beer") == 0)
goto L_TooMany;
Zeny -= 95;
getitem "Beer", 1;
mes "";
mesn;
mesq l("Thanks for the tip!");
goto L_Close;
case 3:
if (Zeny < 100)
goto L_NoMoney;
getinventorylist;
if (@inventorylist_count == 100 && countitem("Beer") == 0)
goto L_TooMany;
Zeny -= 100;
getitem "Beer", 1;
mes "";
mesn;
mesq l("Thank you, sweetie! Want to hear a secret?");
switch (select(l("What is it, darling?"),
l("Nah, I don't feel like chatting.")))
{
case 1:
mes "";
mesn;
mesq l("The master bowyer in this village used to construct exceptional bows. When you want one you should go and ask him.");
goto L_Close;
case 2:
goto L_No;
}
goto L_Close;
case 4:
goto L_No;
}
L_NoMoney:
mes "";
mesn;
mesq l("You look broke. Don't think that you can dine and dash here!");
goto L_Close;
L_No:
mes "";
mesn;
mesq l("Just call me when you changed your mind.");
goto L_Close;
L_Close:
initnpctimer;
npc_resumemove;
close;
L_TooMany:
mes "";
mesn;
mesq l("You don't have room for a beer!");
goto L_Close;
OnTimer1000:
dographmovestep;
OnTouch:
StartConversation;
end;
OnInit:
.distance = 5;
.speed = 300;
initmovegraph "startspot", 40, 29,
"barkeeper", 43, 30,
"kfahr_r", 45, 36,
"kfahr_l", 43, 35,
"l_table_b", 36, 36,
"l_table_r", 38, 33,
"m_table_l", 39, 33,
"m_table_b", 41, 36,
"r_table_r", 46, 33,
"fireplace", 36, 28,
"firewood", 33, 28,
"to_basement", 52, 32,
"basement_entrance", 24, 25,
"basement_cabinet", 30,31,
"cabinet", 42, 28,
"bucket", 46, 30;
setmovegraphcmd "startspot", "firewood", 1, "dir 4; wait 5",
"firewood", "fireplace", 1, "dir 4; wait 3",
"fireplace", "startspot", 1, "dir 0; wait 10",
"startspot", "l_table_b", 1, "dir 4; wait 3",
"l_table_b", "l_table_r", 1, "dir 2; wait 3",
"l_table_r", "m_table_l", 1, "dir 6; wait 3",
"m_table_l", "m_table_b", 1, "dir 4; wait 3",
"m_table_b", "r_table_r", 1, "dir 2; wait 3",
"r_table_r", "bucket", 1, "dir 4; wait 1; emote 1;"
"wait 15; moveon",
"bucket", "startspot", 1, "dir 0; wait 5",
"startspot", "kfahr_r", 2, "dir 4; wait 5",
"kfahr_r", "barkeeper", 1, "dir 4; wait 1;"
"say Another round for kfahr's table.;"
"wait 1; say They sure are thirsty today;"
"wait 5; moveon",
"barkeeper", "kfahr_l", 1, "dir 6; wait 3;"
"say Cheers!;"
"wait 3; moveon",
"kfahr_l", "startspot", 1, "dir 0; wait 10",
"startspot", "to_basement", 1, "dir 4; warp 008-2-5 basement_entrance",
"basement_entrance", "basement_cabinet", 1, "dir 4; wait 5",
"basement_cabinet", "basement_entrance", 1, "dir 4; warp 008-2-2 to_basement",
"to_basement", "cabinet", 1, "dir 4; wait 5",
"cabinet", "startspot", 1, "dir 0; wait 15";
firstmove "wait 8";
initnpctimer;
}