summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-09-23 18:56:15 -0300
committerJesusaves <cpntb1@ymail.com>2021-09-23 18:56:15 -0300
commit6e498ef65cef5d78e76f2f9146875a06c5fcd996 (patch)
tree06cf8c9301e1d91ef04087458d7a4aea320da1e1 /npc/functions
parentdd9bdd6a917b5b1aff3de58a172e8b5552980148 (diff)
downloadserverdata-6e498ef65cef5d78e76f2f9146875a06c5fcd996.tar.gz
serverdata-6e498ef65cef5d78e76f2f9146875a06c5fcd996.tar.bz2
serverdata-6e498ef65cef5d78e76f2f9146875a06c5fcd996.tar.xz
serverdata-6e498ef65cef5d78e76f2f9146875a06c5fcd996.zip
The town admins may now donate their GP to the town vault.
This allow them to assume a more lax tax policy.
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/politics.txt13
1 files changed, 13 insertions, 0 deletions
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;