// Evol scripts.
// Authors:
// Reid
// Description:
// Red, the INN Keeper.
// Variable:
// INN_Register
001-2-28,28,28,0 script Red#001-2-28 NPC_RED,{
function narrator_explication {
narrator 4,
l("You will respawn at this place if defeated in combat.");
//l("Unlike other respawn points, an INN can fully restore your HP.");
// ^^^ 1/2 is restored @die, Red does not offer to heal.
// The respawn point remains until set somewhere else.
// The INN seems to charge only once.
return;
}
function register_room {
// A somehow of BaseLevel * logn (BaseLevel * 100).
.@price = 0;
.@pc_level = BaseLevel * 100;
while (.@pc_level >>= 1)
{
++.@price;
}
.@price *= BaseLevel;
if (.@price <= 10)
{
.@price = 10;
}
speech 5,
l("That will be @@E to set your respawn point", .@price),
l("This will remain your respawn point until set elsewhere."),
l("Is that okay?");
switch (select (l("[Yes]"),
l("[No]")))
{
case 1:
if (Zeny < .@price)
{
speech 5, l("You don't have enough money, bring @@E.", .@price);
}
else
{
emotion 3;
Zeny = Zeny - .@price;
INN_Register = REDPLUSH_INN;
if (Sex == G_FEMALE)
{
savepoint "001-2-29.gat", 29, 49;
}
else
{
savepoint "001-2-29.gat", 29, 35;
}
speech 5,
l("Okay. You can go upstairs and choose a room.");
narrator_explication;
}
break;
case 2:
speech 5,
l("Come back later if you changed your mind!");
break;
}
return;
}
speech 4,
l("Welcome to the RedPlush INN!"),
l("What do you need?");
do
{
menuint rif(INN_Register == 0, ("Could I lodge here for a while?")), 1,
l("What service do you offer?"), 2,
l("What is your tipiou trying to do?"), 3,
l("Nothing."), 4;
switch (@menuret)
{
case 1:
register_room;
break;
case 2:
emotion 6;
speech 5,
l("We offer a room for travelers passing by Artis, our beds are comfy and you can be guaranted to be right as rain after a night here!"),
l("If you wake up at the INN after a harsh battle, you will find yourself revitalized in an instant unlike other places where you can rest.");
narrator_explication;
break;
case 3:
speech 5,
l("That poor one is doing his best to fly... But his last meal and the gravity is not helping him so far!");
break;
case 4:
break;
}
} while (@menuret != 1 && @menuret != 4);
closedialog;
goodbye;
close;
OnInit:
.sex = G_FEMALE;
.distance = 5;
}