From ec60fb0d4382bac5d6bc579934f3631a79ad94fa Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 9 Sep 2019 17:42:26 -0300 Subject: Fix bugs --- npc/functions/politics.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'npc/functions/politics.txt') 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; -- cgit v1.2.3-70-g09d2