diff options
Diffstat (limited to 'npc/functions/savepoint.txt')
-rw-r--r-- | npc/functions/savepoint.txt | 15 |
1 files changed, 12 insertions, 3 deletions
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); |