diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-04-13 20:48:41 +0000 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-04-13 20:48:41 +0000 |
commit | 3a843c307c4c654552eb3bc4b4e653470f409e5b (patch) | |
tree | 0f17bcacfa80e8be731f0a296820762270802355 /npc/functions | |
parent | 65d7d45d9b4d0bcaec8cc56c95fb468e4bec4f35 (diff) | |
parent | 65449ffbf0bf377312f74a3e2c03dc2847730363 (diff) | |
download | serverdata-galimatia.tar.gz serverdata-galimatia.tar.bz2 serverdata-galimatia.tar.xz serverdata-galimatia.zip |
Merge branch 'jesusalva/inns' into 'master'galimatia
Reimplement INN system and add Rusty Pick Inn
Closes evol-all#8
See merge request evol/serverdata!170
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/beds.txt | 14 | ||||
-rw-r--r-- | npc/functions/savepoint.txt | 15 |
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); |