summaryrefslogtreecommitdiff
path: root/npc/commands
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-02-26 10:44:59 -0300
committerJesusaves <cpntb1@ymail.com>2020-02-26 10:44:59 -0300
commit0baaf2674734e59ddaf27c326a6bdf07d34896eb (patch)
treea60b89f2518dfd04e6d5f6df0e4b2786283c805c /npc/commands
parentbcd58850a721a39dcf538aea2a14f009810c6cf9 (diff)
downloadserverdata-0baaf2674734e59ddaf27c326a6bdf07d34896eb.tar.gz
serverdata-0baaf2674734e59ddaf27c326a6bdf07d34896eb.tar.bz2
serverdata-0baaf2674734e59ddaf27c326a6bdf07d34896eb.tar.xz
serverdata-0baaf2674734e59ddaf27c326a6bdf07d34896eb.zip
De-hardcode the battle configuration flags (BCONF)
Reason: Automatize and protect the EXP Bonus on TMW2 Day Event.
Diffstat (limited to 'npc/commands')
-rw-r--r--npc/commands/event.txt6
-rw-r--r--npc/commands/rate-management.txt16
2 files changed, 14 insertions, 8 deletions
diff --git a/npc/commands/event.txt b/npc/commands/event.txt
index 907997b81..0e4ccd621 100644
--- a/npc/commands/event.txt
+++ b/npc/commands/event.txt
@@ -54,6 +54,12 @@ function script sClear {
enablenpc "Demure#ValentineFinal";
}
+ // Longer EXP rate controls
+ if ($EVENT$ == "Anniversary") {
+ $BCONFB_EXPR-=50;
+ kamibroadcast("EXP Rate changed from %d%% to %d%%", $BCONFB_EXPR+50, $BCONFB_EXPR);
+ }
+
// Simpler events
$PATRICK_DAYCTRL=0;
$PATRICK_DAYMAX=0;
diff --git a/npc/commands/rate-management.txt b/npc/commands/rate-management.txt
index 0a0e531ec..a0a0ac2dc 100644
--- a/npc/commands/rate-management.txt
+++ b/npc/commands/rate-management.txt
@@ -4,17 +4,17 @@
function expRateReal {
if (is_night())
- return BCONFB_EXPR+BCONFN_EXPR;
+ return $BCONFB_EXPR+$BCONFN_EXPR;
else
- return BCONFB_EXPR+BCONFD_EXPR;
+ return $BCONFB_EXPR+$BCONFD_EXPR;
}
function expRecalc {
.@val=getarg(0);
if (is_night())
- return .@val+BCONFN_EXPR;
+ return .@val+$BCONFN_EXPR;
else
- return .@val+BCONFD_EXPR;
+ return .@val+$BCONFD_EXPR;
}
function rateCleanUp {
@@ -193,17 +193,17 @@ OnInheirtedReload:
function dropRateReal {
if (is_night())
- return BCONFB_DROP+BCONFN_DROP;
+ return $BCONFB_DROP+$BCONFN_DROP;
else
- return BCONFB_DROP+BCONFD_DROP;
+ return $BCONFB_DROP+$BCONFD_DROP;
}
function dropRecalc {
.@val=getarg(0);
if (is_night())
- return .@val+BCONFN_DROP;
+ return .@val+$BCONFN_DROP;
else
- return .@val+BCONFD_DROP;
+ return .@val+$BCONFD_DROP;
}
function rateCleanUp {