From ebf262e4c814c39dc3354f59c579764b6c220339 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 15 Sep 2019 00:36:16 -0300 Subject: Overriding a previous exp up now requires confirmation. --- npc/commands/rate-management.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'npc/commands') 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; -- cgit v1.2.3-60-g2f50