summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2025-08-03 21:51:08 -0300
committerJesusaves <cpntb1@ymail.com>2025-08-03 21:51:08 -0300
commit3dba73dac15e56410effdbfdf38bb9debf9186b3 (patch)
tree9e9d9313d5e0f9919d8ed02e80937befe7517e80
parent34b356ab9632c84a0e5bfd5fdf984881db1959a2 (diff)
downloadserverdata-3dba73dac15e56410effdbfdf38bb9debf9186b3.tar.gz
serverdata-3dba73dac15e56410effdbfdf38bb9debf9186b3.tar.bz2
serverdata-3dba73dac15e56410effdbfdf38bb9debf9186b3.tar.xz
serverdata-3dba73dac15e56410effdbfdf38bb9debf9186b3.zip
Add Drop rate option
-rw-r--r--npc/functions/politics.txt36
1 files changed, 36 insertions, 0 deletions
diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt
index 078780b3f..34383ef50 100644
--- a/npc/functions/politics.txt
+++ b/npc/functions/politics.txt
@@ -438,6 +438,7 @@ function script POL_Manage {
rif(.@left >= 6, l("Exile a player")), 70,
rif(.@left >= 6, l("Revert a player exile")), 71,
rif(.@left, l("Raise server wide EXP")), 80,
+ rif(.@left, l("Raise server wide DROP")), 81,
rif(.@left, l("Invest in Bimonthly Bazaar")), 83,
rif(Zeny > $ALLIANCE_TAX1, l("Donate to town")), 90,
l("Resign"), 99;
@@ -741,6 +742,41 @@ function script POL_Manage {
end;
}
break;
+ case 81:
+ .@gcost=50000;
+ .@rcost=25;
+ .@b=5+(.@RP/10);
+ .@time = ($GAME_STORYLINE >= 5 ? 3 : 2);
+ if ($GAME_STORYLINE >= 5)
+ .@b = .@b * 3 / 2; // 50% Bonus after MK is dead
+ mesc l(".:: Server Boom ::."), 3;
+ mesc l("To cause a server happy hour (+%d%% DROP), you need:", .@b);
+ mesc l("%s GP and %d REP.", fnum(.@gcost), .@rcost);
+ tutmes l("* Actual effect lasts %d hours.", .@time), l("Note"), false;
+ if (.@RP < .@rcost || .@GP < .@gcost)
+ break;
+ mesc l("Are you sure?");
+ if (askyesno() == ASK_YES) {
+ setd(.@town$+"_REPUTATION", .@RP-.@rcost);
+ setd(.@town$+"_MONEY", .@GP-.@gcost);
+ TOWN_ACTIONS[.@TP]+=1;
+ mesc l("Server Happy Hour Decreed"), 1; // Will not be shown
+ kamibroadcast(sprintf("%s has sponsored a Server Happy Hour using tax money!", .@MAYOR$));
+ // Effective immediately
+ $@DROP_EVENT=.@b;
+ $@DROP_EVENT_TIME=.@time;
+ donpcevent "@droprate::OnPlayerCall";
+ // Exp Rate will apply, ONLY IF Monster King has been defeated
+ if ($GAME_STORYLINE >= 5) {
+ $@EXP_EVENT=.@b * any(1,1,2,2,3) / 3;
+ $@EXP_EVENT_TIME=3;
+ donpcevent "@exprate::OnPlayerCall";
+ }
+ // We must terminate dialog now and close all context for EXPRATE.
+ closeclientdialog;
+ end;
+ }
+ break;
case 83:
.@cost = 50000 - (.@TX * 8); // TX Cap 12000
mesc l("Bimonthly Bazaar Investment"), 3;