summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-11-09 17:32:26 -0300
committerJesusaves <cpntb1@ymail.com>2019-11-09 17:32:26 -0300
commitdd7556138108c87116fd1019547bea6c9adacb61 (patch)
tree65d4bfebac02edf2cbe4453a323149762821978b /npc
parent8770fd59266f4b5f921e2d4456bf842c42e6497a (diff)
downloadserverdata-dd7556138108c87116fd1019547bea6c9adacb61.tar.gz
serverdata-dd7556138108c87116fd1019547bea6c9adacb61.tar.bz2
serverdata-dd7556138108c87116fd1019547bea6c9adacb61.tar.xz
serverdata-dd7556138108c87116fd1019547bea6c9adacb61.zip
Fix bugs. Town admins can now give tax exemption for crafters.
This would lower the price for everyone =D But town won't receive money.
Diffstat (limited to 'npc')
-rw-r--r--npc/functions/politics.txt22
1 files changed, 18 insertions, 4 deletions
diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt
index b3eeb209f..4afc852a8 100644
--- a/npc/functions/politics.txt
+++ b/npc/functions/politics.txt
@@ -101,11 +101,11 @@ function script POL_AdjustPrice {
.@l$=getarg(1, LOCATION$);
// Town Admin is always tax exempt
- if (getd(.@l$ + "_MAYOR$") == strcharinfo(0))
+ if (getd("$" + .@l$ + "_MAYOR$") == strcharinfo(0))
.@p=0;
// Town option for tax immunity
- if (getd(.@l$ + "_TAXOFF")) {
+ if (getd("$" + .@l$ + "_TAXOFF")) {
.@vat=getd("$"+.@l$+"_TAX");
.@tax=.@p*.@vat/10000;
.@p-=.@tax;
@@ -125,7 +125,7 @@ function script POL_PlayerMoney {
Zeny-=.@p;
// Town option for tax immunity
- if (getd(.@l$ + "_TAXOFF")) {
+ if (getd("$" + .@l$ + "_TAXOFF")) {
return 0;
}
@@ -133,7 +133,7 @@ function script POL_PlayerMoney {
.@vat=getd("$"+.@l$+"_TAX");
.@tax=.@p*.@vat/10000;
.@GP=getd("$"+getarg(0)+"_MONEY");
- setd(.@town$+"_MONEY", .@GP+.@tax);
+ setd("$" + .@l$+"_MONEY", .@GP+.@tax);
// Return the taxes paid
return .@tax;
@@ -342,6 +342,7 @@ function script POL_Manage {
.@TX=getd("$"+getarg(0)+"_TAX");
.@EX=getd("$"+getarg(0)+"_EXPORT");
.@RP=getd("$"+getarg(0)+"_REPUTATION");
+ .@CR=getd("$"+getarg(0)+"_TAXOFF");
mesc l("Town Money: @@", .@GP), 2;
mesc l("Town Reputation: %d | %d.%02d %% Tax", .@RP, .@TX/100, .@TX%100), 2;
@@ -353,6 +354,8 @@ function script POL_Manage {
l("Invest in Reputation"), 20,
l("Raise city taxes"), 30,
l("Lower city taxes"), 35,
+ rif(.@CR && .@RP, l("Tax crafters")), 40,
+ rif(!.@CR, l("Don't tax crafters")), 41,
l("Resign"), 99;
mes "";
switch (@menuret) {
@@ -424,6 +427,17 @@ function script POL_Manage {
next;
}
break;
+ // Mark 40: Tax Crafters
+ case 40:
+ setd("$"+getarg(0)+"_TAXOFF", false);
+ setd(.@town$+"_REPUTATION", .@RP-1);
+ mesc l("Crafters are now paying taxes."), 1;
+ break;
+ case 41:
+ setd("$"+getarg(0)+"_TAXOFF", true);
+ setd(.@town$+"_REPUTATION", .@RP+1);
+ mesc l("Crafters no longer pays taxes. (Tax exempt)"), 1;
+ break;
// Mark 90: Office
case 99:
mesc l("Really resign?"), 1;