summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;