summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-02-25 11:14:30 -0300
committerJesusaves <cpntb1@ymail.com>2020-02-25 11:14:30 -0300
commit676f44577c6a7651a5d0741d9bf679bfe6139a2f (patch)
tree33b1730703efb561b998020df52da463c5d6cfd7
parent88d7c8c2530a2179b48ec0d862e4d53dc788ba15 (diff)
downloadserverdata-676f44577c6a7651a5d0741d9bf679bfe6139a2f.tar.gz
serverdata-676f44577c6a7651a5d0741d9bf679bfe6139a2f.tar.bz2
serverdata-676f44577c6a7651a5d0741d9bf679bfe6139a2f.tar.xz
serverdata-676f44577c6a7651a5d0741d9bf679bfe6139a2f.zip
Very early version of Tulimshar Inn
-rw-r--r--npc/003-9/recepcionist.txt29
1 files changed, 27 insertions, 2 deletions
diff --git a/npc/003-9/recepcionist.txt b/npc/003-9/recepcionist.txt
index c9ebe7abf..eb940c106 100644
--- a/npc/003-9/recepcionist.txt
+++ b/npc/003-9/recepcionist.txt
@@ -5,8 +5,33 @@
// Tulimshar Inn Recepcionist
003-9,62,128,0 script Recepcionist#TInn NPC_LOF_BARKEEPER,{
- npctalk3 l("Hello, and welcome to Tulimshar Inn.");
- emotion E_HAPPY;
+ // You're on Main Quest - total priority
+ if (LUA_ASKED_TO_SLEEP)
+ goto L_Cutscene;
+
+ // Otherwise, you cannot sleep here before finishing Lua's Quest
+ if (getq(General_Narrator) < 3) {
+ npctalk3 l("Hello, and welcome to Tulimshar Inn.");
+ emotion E_HAPPY;
+ end;
+ }
+
+ .@price=limit(400, 700+(BaseLevel*3)-getq(General_Narrator)*6, 1200);
+ .@price=POL_AdjustPrice(.@price);
+
+ mesn;
+ mesq l("Good %s. Would you like to sleep here? It's only %d GP!", (is_night() ? l("evening") : l("day")), .@price);
+ mesc l("Sleeping will fully replenish your health.");
+ next;
+ if (askyesno() == ASK_YES && Zeny > .@price) {
+ POL_PlayerMoney(.@price);
+ percentheal 100, 100;
+ closeclientdialog;
+ }
+ close;
+
+L_Cutscene:
+ mesc l("continues"), 1;
close;
OnInit: