summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/functions/politics.txt44
1 files changed, 36 insertions, 8 deletions
diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt
index a0cc09856..724d84450 100644
--- a/npc/functions/politics.txt
+++ b/npc/functions/politics.txt
@@ -377,6 +377,7 @@ function script POL_Manage {
.@RP=getd("$"+getarg(0)+"_REPUTATION");
.@CR=getd("$"+getarg(0)+"_TAXOFF");
.@DQ=getd("$"+getarg(0)+"_DAILYQUEST");
+ .@left=(gettimeparam(GETTIME_HOUR)/4)-TOWN_ACTIONS[.@TP];
mesc l("Town Money: @@", .@GP), 2;
mesc l("Town Reputation: %d | %d.%02d %% Tax", .@RP, .@TX/100, .@TX%100), 2;
@@ -386,20 +387,21 @@ function script POL_Manage {
menuint
l("Nothing"), 0,
rif(.@DQ != gettimeparam(GETTIME_DAYOFMONTH), l("Do some paperwork")), 1,
- l("Invest in Exportations"), 10,
- l("Invest in Reputation"), 20,
- l("Raise city taxes"), 30,
- l("Lower city taxes"), 35,
+ rif(.@left, l("Invest in Exportations")), 10,
+ rif(.@left, l("Invest in Reputation")), 20,
+ rif(.@left, l("Raise city taxes")), 30,
+ rif(.@left, l("Lower city taxes")), 35,
rif(.@CR && .@RP, l("Tax crafters")), 40,
rif(!.@CR, l("Don't tax crafters")), 41,
l("Exile a player"), 70,
l("Revert a player exile"), 71,
+ rif(.@left, l("Raise server wide EXP")), 80,
l("Resign"), 99;
mes "";
switch (@menuret) {
// Mark 0: Cycle
case 1:
- if (rand(3) == 1)
+ if (rand2(3) == 1)
setd(.@town$+"_REPUTATION", limit(0, .@RP+1, 100));
setd(.@town$+"_DAILYQUEST", gettimeparam(GETTIME_DAYOFMONTH));
mesc l("You dealt with paperwork."), 2;
@@ -443,7 +445,7 @@ function script POL_Manage {
next;
}
break;
- // Mark 30: TAXES
+ // Mark 30: TAXES and Tax Governance
case 30:
.@cost=.@TX/11;
mesc l("Raising Taxes"), 3;
@@ -476,7 +478,7 @@ function script POL_Manage {
next;
}
break;
- // Mark 40: Tax Crafters
+ // Mark 40: Tax Crafters and Town Policies
case 40:
setd("$"+getarg(0)+"_TAXOFF", false);
setd(.@town$+"_REPUTATION", .@RP-1);
@@ -487,7 +489,7 @@ function script POL_Manage {
setd(.@town$+"_REPUTATION", .@RP+1);
mesc l("Crafters no longer pays taxes. (Tax exempt)"), 1;
break;
- // Mark 70: Exile
+ // Mark 70: Exile and Player functions
case 70:
mesc l("Exiled players will not be able to save to menhir."), 1;
mesc l("A global announcement will be made."), 1;
@@ -542,6 +544,32 @@ function script POL_Manage {
kamibroadcast(sprintf("%s has ANNULED THE EXILE %s from %s.",
.@MAYOR$, .@ex$, getarg(0)));
break;
+ // Mark 80: Town and Server Governance
+ case 80:
+ .@gcost=50000;
+ .@rcost=25;
+ .@b=5+(.@RP/10);
+ 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);
+ 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
+ $@EXP_EVENT=.@b;
+ $@EXP_EVENT_TIME=1;
+ donpcevent "@exprate::OnPlayerCall";
+ // We must terminate dialog now and close all context for EXPRATE.
+ closeclientdialog;
+ end;
+ }
+ break;
// Mark 90: Office
case 99:
mesc l("Really resign?"), 1;