summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-09-09 17:42:26 -0300
committerJesusaves <cpntb1@ymail.com>2019-09-09 17:42:26 -0300
commitec60fb0d4382bac5d6bc579934f3631a79ad94fa (patch)
tree5f9073e31f4e6db12b02a2179f5eca67d12dc9df /npc
parent41570b5ff91b3bc545e87bbd4de87cb001e6a390 (diff)
downloadserverdata-ec60fb0d4382bac5d6bc579934f3631a79ad94fa.tar.gz
serverdata-ec60fb0d4382bac5d6bc579934f3631a79ad94fa.tar.bz2
serverdata-ec60fb0d4382bac5d6bc579934f3631a79ad94fa.tar.xz
serverdata-ec60fb0d4382bac5d6bc579934f3631a79ad94fa.zip
Fix bugs
Diffstat (limited to 'npc')
-rw-r--r--npc/functions/politics.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt
index 22b34ddf2..6c6134a3c 100644
--- a/npc/functions/politics.txt
+++ b/npc/functions/politics.txt
@@ -234,7 +234,7 @@ function script POL_Candidate {
}
next;
- if (#POL_VOTEDAY[POL_LocToTP(getarg(0))] == gettimeparam(GETTIME_WEEKDAY) || is_gm())
+ if (#POL_VOTEDAY[POL_LocToTP(getarg(0))] == gettimeparam(GETTIME_WEEKDAY))
return;
mesc l("In whom to vote?");
select .@list$;
@@ -245,8 +245,7 @@ function script POL_Candidate {
return;
// You cannot vote on yourself
- .@str$="$"+getarg(0)+"_VOTES"+"["+.@vote+"]";
- if (getd(.@str$) == strcharinfo(0)) {
+ if (getd("$"+getarg(0)+"_CANDIDATE$"+"["+.@vote+"]") == strcharinfo(0)) {
mesc l("You cannot vote on yourself!"), 1;
// mesc l("Use an alt char to do that.");
return;
@@ -254,6 +253,7 @@ function script POL_Candidate {
// Cast the vote
#POL_VOTEDAY[POL_LocToTP(getarg(0))]=gettimeparam(GETTIME_WEEKDAY);
+ .@str$="$"+getarg(0)+"_VOTES"+"["+.@vote+"]";
.@vt=getd(.@str$);
setd(.@str$, .@vt+1);
@@ -274,7 +274,7 @@ function script POL_TownInfo {
.@RP=getd("$"+getarg(0)+"_REPUTATION");
if (strcharinfo(0) == .@MAYOR$) {
mesc l("Town Money: @@", .@GP), 2;
- mesc l("Town Reputation: @@ | @@.@@%% Tax", .@RP, .@TX/100, .@TX%100), 2;
+ mesc l("Town Reputation: @@ | @@.@@ %% Tax", .@RP, .@TX/100, .@TX%100), 2;
mesc l("Town Weekly Exports: @@", .@EX), 2;
}
return;
@@ -299,7 +299,7 @@ function script POL_Manage {
.@RP=getd("$"+getarg(0)+"_REPUTATION");
mesc l("Town Money: @@", .@GP), 2;
- mesc l("Town Reputation: @@ | @@.@@%% Tax", .@RP, .@TX/100, .@TX%100), 2;
+ mesc l("Town Reputation: %d | %d.%02d %% Tax", .@RP, .@TX/100, .@TX%100), 2;
mesc l("Town Weekly Exports: @@", .@EX), 2;
next;
menuint
@@ -375,7 +375,7 @@ function script POL_Manage {
if (askyesno() == ASK_YES) {
setd(.@town$+"_TAX", max(0, .@TX-.@cost));
setd(.@town$+"_REPUTATION", min(100, .@RP+.@cost));
- mesc l("Taxes raised"), 1;
+ mesc l("Taxes lowered"), 1;
next;
}
break;