summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-06-21 18:27:37 -0300
committerJesusaves <cpntb1@ymail.com>2018-06-21 18:27:37 -0300
commit03a172cd4d18c17f894247f8dc063e8c7d7beb75 (patch)
treee23f6423ea5e2b8bbedf227048a548540f471fb1 /npc
parent19cf8ef5e40f50ac1a63d31b82575b382f6f6008 (diff)
downloadserverdata-03a172cd4d18c17f894247f8dc063e8c7d7beb75.tar.gz
serverdata-03a172cd4d18c17f894247f8dc063e8c7d7beb75.tar.bz2
serverdata-03a172cd4d18c17f894247f8dc063e8c7d7beb75.tar.xz
serverdata-03a172cd4d18c17f894247f8dc063e8c7d7beb75.zip
"Fix" some bad motion values
Diffstat (limited to 'npc')
-rw-r--r--npc/commands/rate-management.txt30
1 files changed, 10 insertions, 20 deletions
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);
}