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/003-3/malindou.txt | 12 ++++++++++++ npc/functions/politics.txt | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt index 3d8a62c24..971d33665 100644 --- a/npc/003-3/malindou.txt +++ b/npc/003-3/malindou.txt @@ -69,6 +69,8 @@ OnInit: $BCONFD_DROP = 0; $BETASERVER = false; $AUTORESTART = false; + $ALLIANCE_TAX1 = 7500; + $ALLIANCE_TAX2 = 30; $FIRESOFSTEAM[1] = 2000; $FIRESOFSTEAM[2] = 2000; $FIRESOFSTEAM[3] = 2000; @@ -633,6 +635,16 @@ OnInit: debugmes "* Skill changes"; debugmes ""; } + // Current UPDATE value: Qui Set 23 18:46:36 BRT 2021 + // Variable Update + if ($UPDATE < 1632433596) { + $UPDATE=1632433596; + $ALLIANCE_TAX1 = 7500; + $ALLIANCE_TAX2 = 30; + debugmes ""; + debugmes "* New global variables"; + debugmes ""; + } // This mensures Contributors Credits, and changes only during updates. 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-60-g2f50