From 6e498ef65cef5d78e76f2f9146875a06c5fcd996 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 23 Sep 2021 18:56:15 -0300 Subject: The town admins may now donate their GP to the town vault. This allow them to assume a more lax tax policy. --- npc/functions/politics.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'npc/functions') diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt index 0a35d2458..7d32fbca1 100644 --- a/npc/functions/politics.txt +++ b/npc/functions/politics.txt @@ -419,6 +419,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(Zeny > $ALLIANCE_TAX1, l("Donate to town")), 90, l("Resign"), 99; mes ""; switch (@menuret) { @@ -601,6 +602,18 @@ function script POL_Manage { } break; // Mark 90: Office + case 90: + mesc l("The alliance will take %s GP as fee, +%d%% tax over donations.", fnum($ALLIANCE_TAX1), $ALLIANCE_TAX2), 1; + mesc l("You can donate up to %s GP.", fnum(Zeny-$ALLIANCE_TAX1)); + input .@donate, 0, Zeny-$ALLIANCE_TAX1; + if (.@donate <= 0) + break; + Zeny -= $ALLIANCE_TAX1; + .@tax = .@donate * (100-$ALLIANCE_TAX2) / 100; + setd(.@town$+"_MONEY", .@GP+.@tax); + Zeny -= .@donate; + mesc l("Donation completed."), 2; + break; case 99: mesc l("Really resign?"), 1; next; -- cgit v1.2.3-70-g09d2