From 3ed73e0a0b424ca5b2b8491f365bf601e34220f9 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 29 Apr 2019 10:20:40 -0300 Subject: @ucp may now update your save point if you SAVE AND EXIT. --- npc/commands/ucp.txt | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'npc/commands') 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); } -- cgit v1.2.3-70-g09d2