From 03a172cd4d18c17f894247f8dc063e8c7d7beb75 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 21 Jun 2018 18:27:37 -0300 Subject: "Fix" some bad motion values --- npc/commands/rate-management.txt | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'npc') diff --git a/npc/commands/rate-management.txt b/npc/commands/rate-management.txt index ded3f1f52..8a9585bf9 100644 --- a/npc/commands/rate-management.txt +++ b/npc/commands/rate-management.txt @@ -21,16 +21,14 @@ OnCall: if (!is_gm()) - { end; - } .@special$ = strip(.@atcmd_parameters$[0]); // special value .@new_rate = min(atoi(.@special$), 1000); // or just a regular integer .@hours = min(0x7FFFFFFE, max(1, atoi(strip(.@atcmd_parameters$[1])))); // number of hours - if (.@new_rate > 0) - { + if (.@new_rate > 0) { + // set new exp rate .hours = 0; .max_hours = .@hours; @@ -46,27 +44,21 @@ OnCall: //dispbottom l("You successfully set the exp rate to @@%. It will reset to @@% (default value) in @@.", // .@new_rate, .original_exp_rate, FuzzyTime(time_from_hours(.max_hours), 2, 2)); dispbottom l("You can also manually stop it at any time with: @exprate default"); - } - else if (.@new_rate == 0 && .@special$ == "") - { + } else if (.@new_rate == 0 && .@special$ == "") { + // get current exp rate - if (.current_rate == .original_exp_rate) - { + if (.current_rate == .original_exp_rate) { dispbottom l("Current exp rate is set to @@% (default value).", .current_rate); - } - - else - { + } else { dispbottom l("Current exp rate is set to @@%, and will reset to @@% (default value) in @@.", .current_rate, .original_exp_rate, remainingTime()); dispbottom l("If you meant to reset the exp rate to its default value: @exprate default"); } - } - else - { + } else { + // reset rateCleanUp; dispbottom l("Exp rate has been reset to @@% (default value).", @@ -77,8 +69,7 @@ OnCall: OnTimer3600000: // runs every hour - if (++.hours == .max_hours) - { + if (++.hours == .max_hours) { rateCleanUp; end; } @@ -86,8 +77,7 @@ OnTimer3600000: end; OnPCLoginEvent: - if (.max_hours > 0) - { + if (.max_hours > 0) { dispbottom col(l("Exp rate is set to @@% for the next @@.", .current_rate, remainingTime()), 6); } -- cgit v1.2.3-70-g09d2