summaryrefslogtreecommitdiff
path: root/npc/commands/rate-management.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/commands/rate-management.txt')
-rw-r--r--npc/commands/rate-management.txt41
1 files changed, 17 insertions, 24 deletions
diff --git a/npc/commands/rate-management.txt b/npc/commands/rate-management.txt
index a9cabd13c..d2ef19ec7 100644
--- a/npc/commands/rate-management.txt
+++ b/npc/commands/rate-management.txt
@@ -10,6 +10,7 @@
//setbattleflag("quest_exp_rate", .original_quest_rate);
charcommand("@reloadmobdb"); // this is on purpose (callable without RID)
//charcommand("@reloadquestdb");
+ SeasonReload(1);
}
function remainingTime {
@@ -21,16 +22,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;
@@ -39,34 +38,29 @@ OnCall:
//setbattleflag("quest_exp_rate", .@new_rate);
charcommand("@reloadmobdb");
//charcommand("@reloadquestdb");
+ SeasonReload(1);
initnpctimer; // start counting
- announce l("@@ increased experience rate to @@%. It will only last @@!", strcharinfo(2), .@new_rate, FuzzyTime(time_from_hours(.max_hours), 2, 2)), bc_all;
+ announce strcharinfo(0)+" increased experience rate to "+str(.@new_rate)+"%. It will only last "+str(FuzzyTime(time_from_hours(.max_hours), 2, 2))+"!", bc_all;
//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 +71,7 @@ OnCall:
OnTimer3600000:
// runs every hour
- if (++.hours == .max_hours)
- {
+ if (++.hours == .max_hours) {
rateCleanUp;
end;
}
@@ -86,8 +79,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);
}
@@ -129,6 +121,7 @@ OnInit:
setbattleflag("item_rate_card", .org_dxn);
setbattleflag("item_rate_card_boss", .org_dxb);
charcommand("@reloadmobdb"); // this is on purpose (callable without RID) - no idea what is the purpose
+ SeasonReload(1);
}
function remainingTime {
@@ -139,8 +132,7 @@ OnInit:
}
OnCall:
- if (!is_gm())
- {
+ if (!is_gm()) {
end;
}
@@ -165,9 +157,10 @@ OnCall:
setbattleflag("item_rate_card", .@new_rate);
setbattleflag("item_rate_card_boss", .@new_rate);
charcommand("@reloadmobdb");
+ SeasonReload(1);
initnpctimer; // start counting
- announce l("@@ increased drop rates to @@%. It will only last @@!", strcharinfo(2), .@new_rate, FuzzyTime(time_from_hours(.max_hours), 2, 2)), bc_all;
+ announce strcharinfo(0)+" increased drop rates to "+str(.@new_rate)+"%. It will only last "+str(FuzzyTime(time_from_hours(.max_hours), 2, 2))+"!", bc_all;
//dispbottom l("You successfully set the drop rate to @@%. It will reset to @@% (default value) in @@.",
// .@new_rate, .org_dcn, FuzzyTime(time_from_hours(.max_hours), 2, 2));