summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-01-21 21:05:06 -0300
committerJesusaves <cpntb1@ymail.com>2020-01-21 21:05:06 -0300
commitc6f5de6a3d263672236e1ba399cbd31e320211e4 (patch)
treed163b6d87f4281356c5ce3cb3e5801a1fa42b665
parente673a154cf470d1dae05b4474324daa042d48e8f (diff)
downloadserverdata-c6f5de6a3d263672236e1ba399cbd31e320211e4.tar.gz
serverdata-c6f5de6a3d263672236e1ba399cbd31e320211e4.tar.bz2
serverdata-c6f5de6a3d263672236e1ba399cbd31e320211e4.tar.xz
serverdata-c6f5de6a3d263672236e1ba399cbd31e320211e4.zip
EXP/DROP: GM commands now ONLY override the base exp.
Day/Night exp/drop rate changes will not be overridable. TL;DR GMs can keep using @exprate and @droprate as they were using previously.
-rw-r--r--npc/commands/rate-management.txt50
1 files changed, 33 insertions, 17 deletions
diff --git a/npc/commands/rate-management.txt b/npc/commands/rate-management.txt
index a777bdc2b..51a8e2d78 100644
--- a/npc/commands/rate-management.txt
+++ b/npc/commands/rate-management.txt
@@ -9,6 +9,14 @@
return BCONFB_EXPR+BCONFD_EXPR;
}
+ function expRecalc {
+ .@val=getarg(0);
+ if (is_night())
+ return .@val+BCONFN_EXPR;
+ else
+ return .@val+BCONFD_EXPR;
+ }
+
function rateCleanUp {
stopnpctimer;
.hours = 0;
@@ -56,9 +64,9 @@ OnCall:
.hours = 0;
.max_hours = .@hours;
.current_rate = .@new_rate;
- setbattleflag("base_exp_rate", .@new_rate);
- setbattleflag("job_exp_rate", .@new_rate); // Should GM event do this?
- //setbattleflag("quest_exp_rate", .@new_rate);
+ setbattleflag("base_exp_rate", expRecalc(.@new_rate));
+ setbattleflag("job_exp_rate", expRecalc(.@new_rate)); // Should GM event do this?
+ //setbattleflag("quest_exp_rate", expRecalc(.@new_rate));
charcommand("@reloadmobdb");
//charcommand("@reloadquestdb");
SeasonReload(1);
@@ -118,8 +126,8 @@ OnPlayerCall:
.hours = 0;
.max_hours = $@EXP_EVENT_TIME;
.current_rate = $@EXP_EVENT;
- setbattleflag("base_exp_rate", $@EXP_EVENT);
- setbattleflag("job_exp_rate", $@EXP_EVENT);
+ setbattleflag("base_exp_rate", expRecalc($@EXP_EVENT));
+ setbattleflag("job_exp_rate", expRecalc($@EXP_EVENT));
charcommand("@reloadmobdb");
SeasonReload(1);
initnpctimer; // start counting
@@ -162,7 +170,7 @@ OnInit:
end;
OnReload:
- .@new_rate = .current_rate;
+ .@new_rate = expRecalc(.current_rate);
setbattleflag("base_exp_rate", .@new_rate);
setbattleflag("job_exp_rate", .@new_rate);
//charcommand("@reloadmobdb");
@@ -182,6 +190,14 @@ OnReload:
return BCONFB_DROP+BCONFD_DROP;
}
+ function dropRecalc {
+ .@val=getarg(0);
+ if (is_night())
+ return .@val+BCONFN_DROP;
+ else
+ return .@val+BCONFD_DROP;
+ }
+
function rateCleanUp {
stopnpctimer;
.hours = 0;
@@ -224,16 +240,16 @@ OnCall:
.hours = 0;
.max_hours = .@hours;
.current_rate = .@new_rate;
- setbattleflag("item_rate_common", .@new_rate);
- setbattleflag("item_rate_common_boss", .@new_rate);
- setbattleflag("item_rate_heal", .@new_rate);
- setbattleflag("item_rate_heal_boss", .@new_rate);
- setbattleflag("item_rate_use", .@new_rate);
- setbattleflag("item_rate_use_boss", .@new_rate);
- setbattleflag("item_rate_equip", .@new_rate);
- setbattleflag("item_rate_equip_boss", .@new_rate);
- setbattleflag("item_rate_card", .@new_rate);
- setbattleflag("item_rate_card_boss", .@new_rate);
+ setbattleflag("item_rate_common", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_common_boss", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_heal", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_heal_boss", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_use", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_use_boss", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_equip", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_equip_boss", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_card", dropRecalc(.@new_rate));
+ setbattleflag("item_rate_card_boss", dropRecalc(.@new_rate));
charcommand("@reloadmobdb");
SeasonReload(1);
initnpctimer; // start counting
@@ -293,7 +309,7 @@ OnInit:
end;
OnReload:
- .@new_rate = .current_rate;
+ .@new_rate = dropRecalc(.current_rate);
setbattleflag("item_rate_common", .@new_rate);
setbattleflag("item_rate_common_boss", .@new_rate);
setbattleflag("item_rate_heal", .@new_rate);