diff options
Diffstat (limited to 'npc/commands/ucp.txt')
-rw-r--r-- | npc/commands/ucp.txt | 23 |
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); } |