summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2024-02-08 00:18:56 -0300
committerJesusaves <cpntb1@ymail.com>2024-02-08 00:18:56 -0300
commitc377b59526849491085bc544d1e79154c5fef930 (patch)
tree7c38c0fc895d15e8827401504c61258b7d44d000 /npc/functions
parent8fcd00047c417934ebe198857fa65632c77f3dcc (diff)
downloadserverdata-c377b59526849491085bc544d1e79154c5fef930.tar.gz
serverdata-c377b59526849491085bc544d1e79154c5fef930.tar.bz2
serverdata-c377b59526849491085bc544d1e79154c5fef930.tar.xz
serverdata-c377b59526849491085bc544d1e79154c5fef930.zip
Refactor town rate bonus after MK death
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/politics.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt
index b2ae9dcc4..2d01fabf6 100644
--- a/npc/functions/politics.txt
+++ b/npc/functions/politics.txt
@@ -625,12 +625,13 @@ function script POL_Manage {
.@gcost=50000;
.@rcost=25;
.@b=5+(.@RP/10);
+ .@time = ($GAME_STORYLINE >= 5 ? 3 : 2);
if ($GAME_STORYLINE >= 5)
.@b = .@b * 5 / 2; // 150% Bonus after MK is dead
mesc l(".:: Server Boom ::."), 3;
mesc l("To cause a server happy hour (+%d%% EXP), you need:", .@b);
mesc l("%s GP and %d REP.", fnum(.@gcost), .@rcost);
- tutmes l("* Actual effect lasts %d hours.", 2), l("Note"), false;
+ tutmes l("* Actual effect lasts %d hours.", .@time), l("Note"), false;
if (.@RP < .@rcost || .@GP < .@gcost)
break;
mesc l("Are you sure?");
@@ -642,12 +643,12 @@ function script POL_Manage {
kamibroadcast(sprintf("%s has sponsored a Server Happy Hour using tax money!", .@MAYOR$));
// Effective immediately
$@EXP_EVENT=.@b;
- $@EXP_EVENT_TIME=2;
+ $@EXP_EVENT_TIME=.@time;
donpcevent "@exprate::OnPlayerCall";
// Drop Rate will apply, ONLY IF Monster King has been defeated
if ($GAME_STORYLINE >= 5) {
- $@DROP_EVENT=.@b * 2 / 3;
- $@DROP_EVENT_TIME=2;
+ $@DROP_EVENT=.@b * any(1,1,1,2) / 3;
+ $@DROP_EVENT_TIME=3;
donpcevent "@droprate::OnPlayerCall";
}
// We must terminate dialog now and close all context for EXPRATE.