summaryrefslogtreecommitdiff
path: root/npc/commands/ucp.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-04-29 10:20:40 -0300
committerJesusaves <cpntb1@ymail.com>2019-04-29 10:20:40 -0300
commit3ed73e0a0b424ca5b2b8491f365bf601e34220f9 (patch)
tree3adb5b2710137faa017443551fff67e912b6ea30 /npc/commands/ucp.txt
parent7b1f6f59b0781188c967b896a62c6ecc05df84e4 (diff)
downloadserverdata-3ed73e0a0b424ca5b2b8491f365bf601e34220f9.tar.gz
serverdata-3ed73e0a0b424ca5b2b8491f365bf601e34220f9.tar.bz2
serverdata-3ed73e0a0b424ca5b2b8491f365bf601e34220f9.tar.xz
serverdata-3ed73e0a0b424ca5b2b8491f365bf601e34220f9.zip
@ucp may now update your save point if you SAVE AND EXIT.
Diffstat (limited to 'npc/commands/ucp.txt')
-rw-r--r--npc/commands/ucp.txt23
1 files changed, 20 insertions, 3 deletions
diff --git a/npc/commands/ucp.txt b/npc/commands/ucp.txt
index a5d61d2f1..04743f0f5 100644
--- a/npc/commands/ucp.txt
+++ b/npc/commands/ucp.txt
@@ -5,6 +5,7 @@
function script UserCtrlPanel {
do
{
+ @unsaved=false;
clear;
setnpcdialogtitle l("User Control Panel");
mes l("This menu gives you some options which affect your account.");
@@ -12,6 +13,10 @@ function script UserCtrlPanel {
mes "";
mes l("What do you want to access?");
next;
+ if (@unsaved) {
+ mesc l("Careful: You have unsaved changes!"), 1;
+ mes "";
+ }
select
l("Rules"),
l("Game News"),
@@ -20,7 +25,7 @@ function script UserCtrlPanel {
l("Change Language"),
rif(is_admin() && $@GM_OVERRIDE, l("LoF Merge")),
l("Game Settings"),
- l("Quit");
+ l("Save & Exit");
switch (@menu)
{
@@ -145,6 +150,11 @@ function script UserCtrlPanel {
else
mes l("Autoreceive Strange Coins: ") + col(l("Enabled"), 2);
+ if (@unsaved) {
+ mes "";
+ mesc l("Careful: You have unsaved changes!"), 1;
+ }
+
mes "";
select
l("Return to User Control Panel"),
@@ -156,7 +166,8 @@ function script UserCtrlPanel {
switch (@menu) {
case 2:
GSET_SOULMENHIR_MANUAL=!GSET_SOULMENHIR_MANUAL;
- if (!GSET_SOULMENHIR_MANUAL) savepoint "000-1", 22, 22; break;
+ @unsaved=true;
+ break;
case 3:
GSET_DAILYREWARD_SILENT=!GSET_DAILYREWARD_SILENT; break;
case 4:
@@ -165,7 +176,13 @@ function script UserCtrlPanel {
clear;
} while (@menu != 1);
break;
- case 8: close; break;
+ case 8:
+ // Update savepoint if needed
+ if (@unsaved) {
+ if (!GSET_SOULMENHIR_MANUAL) savepoint "000-1", 22, 22;
+ else doevent "Emergency Exit::OnSetLX";
+ }
+ close; break;
}
} while (1);
}