summaryrefslogtreecommitdiff
path: root/npc/001-2-28/plush.txt
diff options
context:
space:
mode:
authorReid <reidyaro@gmail.com>2016-01-24 01:32:27 +0100
committerReid <reidyaro@gmail.com>2016-01-24 01:32:27 +0100
commit88da3f6da3acdcf97c5b7cc1278c7b206079cd99 (patch)
tree9c887fa22c730e29cd6728871bbe7f3555bcd840 /npc/001-2-28/plush.txt
parent96a9abb656fd6f30b721301bb42c14d38afeb554 (diff)
downloadserverdata-88da3f6da3acdcf97c5b7cc1278c7b206079cd99.tar.gz
serverdata-88da3f6da3acdcf97c5b7cc1278c7b206079cd99.tar.bz2
serverdata-88da3f6da3acdcf97c5b7cc1278c7b206079cd99.tar.xz
serverdata-88da3f6da3acdcf97c5b7cc1278c7b206079cd99.zip
Rename Red into Plush.
Diffstat (limited to 'npc/001-2-28/plush.txt')
-rw-r--r--npc/001-2-28/plush.txt162
1 files changed, 162 insertions, 0 deletions
diff --git a/npc/001-2-28/plush.txt b/npc/001-2-28/plush.txt
new file mode 100644
index 00000000..86853ea2
--- /dev/null
+++ b/npc/001-2-28/plush.txt
@@ -0,0 +1,162 @@
+// Evol scripts.
+// Authors:
+// Reid
+// Description:
+// Red, the INN Keeper.
+// Variable:
+// INN_Register
+
+001-2-28,28,28,0 script Plush#001-2-28 NPC_RED,{
+
+ function narrator_explication {
+ narrator 4,
+ l("You will respawn at this place if defeated in combat."),
+ l("All you have to do is to select a bed in the upper level anytime after your reservation."),
+ l("Unlike other respawn points, an INN can fully restore your HP."),
+ l("Of course, you can select a bed somewhere else after your reservation, but you won't get your HP recovery until you choose to get some rest on the INN."),
+ l("You can also use your room to get some rest after a long battle. That will consume your reservation but your HP will be fully restored.");
+ return;
+ }
+
+ function accepted_room {
+ .@price = getarg (0);
+ 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;
+
+ speech 5, l("Do you want to choose your room yourself?");
+
+ switch (select (l("[Yes]"),
+ l("[No]")))
+ {
+ case 1:
+ speech 5, l("Okay. You can go upstairs and choose a room.");
+ break;
+ case 2:
+ speech 5, l("Okay. I registered you on the @@ room of the upper level.", (Sex == G_FEMALE) ? "4th" : "2nd");
+ savepoint "001-2-29.gat", 29, (Sex == G_FEMALE) ? 49 : 35;
+ break;
+ }
+ }
+ }
+
+ // A somehow of BaseLevel * logn (BaseLevel * 100).
+ function calculate_inn_tax {
+ .@price = 0;
+ .@pc_level = BaseLevel * 100;
+ while (.@pc_level >>= 1)
+ {
+ ++.@price;
+ }
+ .@price *= BaseLevel;
+
+ if (.@price <= 10)
+ {
+ .@price = 10;
+ }
+
+ return .@price;
+ }
+
+ function register_room {
+ .@price = calculate_inn_tax;
+
+ 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:
+ accepted_room (.@price);
+ break;
+ case 2:
+ speech 5,
+ l("Come back later if you changed your mind!");
+ break;
+ }
+
+ return;
+ }
+
+ function lodge_check {
+ if (INN_Register == NO_INN)
+ {
+ register_room;
+ }
+ else if (INN_Register == REDPLUSH_INN)
+ {
+ speech 5,
+ l("You are already registered here."),
+ l("Go on the upper level if you want to change your room or to use it.");
+ }
+ else
+ {
+ speech 5,
+ l("If you are registered somewhere else you will loose that reservation."),
+ l("Do you still want to lodge here?");
+
+ switch (select (l("[Yes]"), l("[No]")))
+ {
+ case 1:
+ register_room;
+ break;
+ case 2:
+ break;
+ }
+ }
+ return;
+ }
+
+
+ speech 4,
+ l("Welcome to the RedPlush INN!"),
+ l("What do you need?");
+
+ do
+ {
+ .@q = select (
+ l("Could I lodge here for a while?"),
+ l("What service do you offer?"),
+ l("What is your tipiou trying to do?"),
+ l("Nothing."));
+
+ switch (.@q)
+ {
+ case 1:
+ lodge_check;
+ 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 (.@q != 1 && .@q != 4);
+
+ closedialog;
+ goodbye;
+ close;
+
+OnInit:
+ .sex = G_FEMALE;
+ .distance = 5;
+}
+