summaryrefslogtreecommitdiff
path: root/npc/commands
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-09-15 00:36:16 -0300
committerJesusaves <cpntb1@ymail.com>2019-09-15 00:36:16 -0300
commitebf262e4c814c39dc3354f59c579764b6c220339 (patch)
tree85104a7d98840e9b7091c580866c1685d9e62a70 /npc/commands
parent4b1e1bb544ebfc4a8a864d7ab404408f160c2aa6 (diff)
downloadserverdata-ebf262e4c814c39dc3354f59c579764b6c220339.tar.gz
serverdata-ebf262e4c814c39dc3354f59c579764b6c220339.tar.bz2
serverdata-ebf262e4c814c39dc3354f59c579764b6c220339.tar.xz
serverdata-ebf262e4c814c39dc3354f59c579764b6c220339.zip
Overriding a previous exp up now requires confirmation.
Diffstat (limited to 'npc/commands')
-rw-r--r--npc/commands/rate-management.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/npc/commands/rate-management.txt b/npc/commands/rate-management.txt
index c7945cd78..c80f2e8ae 100644
--- a/npc/commands/rate-management.txt
+++ b/npc/commands/rate-management.txt
@@ -30,6 +30,20 @@ OnCall:
.@hours = min(0x7FFFFFFE, max(1, atoi(strip(.@atcmd_parameters$[1])))); // number of hours
if (.@new_rate > 0) {
+ // Overwriting previous rate?
+ // Confirmation Required
+ if (.current_rate != 100) {
+ setnpcdialogtitle("@rate-managment");
+ mesc l("WARNING!"), 1;
+ mesc l("A previous exp rate up event is already ongoing."), 1;
+ mesc l("IF YOU CHANGE EXP RATE NOW, PREVIOUS BONUS WILL BE LOST!"), 1;
+ next;
+ mesc l("CONTINUE ANYWAY? [Y/N]"), 1;
+ // aborted
+ if (askyesno() == ASK_NO)
+ close;
+ closeclientdialog;
+ }
// set new exp rate
.hours = 0;