summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-04-13 20:48:41 +0000
committerJesusaves <cpntb1@ymail.com>2019-04-13 20:48:41 +0000
commit65449ffbf0bf377312f74a3e2c03dc2847730363 (patch)
tree0f17bcacfa80e8be731f0a296820762270802355 /npc/functions
parent65d7d45d9b4d0bcaec8cc56c95fb468e4bec4f35 (diff)
downloadserverdata-65449ffbf0bf377312f74a3e2c03dc2847730363.tar.gz
serverdata-65449ffbf0bf377312f74a3e2c03dc2847730363.tar.bz2
serverdata-65449ffbf0bf377312f74a3e2c03dc2847730363.tar.xz
serverdata-65449ffbf0bf377312f74a3e2c03dc2847730363.zip
Reimplement INN system and add Rusty Pick Inn
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/beds.txt14
-rw-r--r--npc/functions/savepoint.txt15
2 files changed, 15 insertions, 14 deletions
diff --git a/npc/functions/beds.txt b/npc/functions/beds.txt
index 9c871a44..a4301891 100644
--- a/npc/functions/beds.txt
+++ b/npc/functions/beds.txt
@@ -2,14 +2,16 @@
// Authors:
// 4144
// Reid
+// Jesusalva
// Description:
// Beds utility functions
+// bedTouch({inn})
function script bedTouch {
if (PC_IS_DEAD)
{
PC_IS_DEAD = 0;
- if (INN_REGISTER == REDPLUSH_INN)
+ if (INN_REGISTER != NO_INN)
{
INN_REGISTER = NO_INN;
percentheal 100,100;
@@ -18,13 +20,3 @@ function script bedTouch {
close;
}
-function script bedClic {
- narrator S_LAST_NEXT, l("Do you want to use this place as save point?");
-
- if (askyesno() == ASK_YES)
- {
- savepointparticle getarg(0, ""), getarg(1, -1), getarg(2, -1), getarg(3, NO_INN);
- }
- closeclientdialog;
- close;
-}
diff --git a/npc/functions/savepoint.txt b/npc/functions/savepoint.txt
index 0e0b6f90..46ef73e8 100644
--- a/npc/functions/savepoint.txt
+++ b/npc/functions/savepoint.txt
@@ -34,12 +34,21 @@ function script savepointparticle {
.@i = 0;
}
- message strcharinfo(0), l("Your position has been saved.");
-
- if (getarg(.@i, NO_INN) == NO_INN)
+ // If this will override your current inn, a confirmation is required.
+ // Unless you already don't have a booked place, then, confirmation is never shown.
+ if (getarg(.@i, NO_INN) != INN_REGISTER && INN_REGISTER != NO_INN)
{
+ mesc l("Do you want to use this place as save point?");
+ mesc b(l("Warning: ")) + l("Previous Inn reservation will be lost!");
+
+ if (askyesno() != ASK_YES)
+ close;
+
INN_REGISTER = NO_INN;
}
+
+ message strcharinfo(0), l("Your position has been saved.");
+
savepoint .@mapname$, .@mapx, .@mapy;
specialeffect(4, SELF, getcharid(3));
@lastSave = gettimetick(2);