From 41570b5ff91b3bc545e87bbd4de87cb001e6a390 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 9 Sep 2019 17:35:18 -0300 Subject: One vote per town and weekly (using TP_ variables for control) --- npc/functions/politics.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt index ba7cd4a90..22b34ddf2 100644 --- a/npc/functions/politics.txt +++ b/npc/functions/politics.txt @@ -234,7 +234,7 @@ function script POL_Candidate { } next; - if (#POL_VOTEDAY == gettimeparam(GETTIME_DAYOFMONTH) || is_gm()) + if (#POL_VOTEDAY[POL_LocToTP(getarg(0))] == gettimeparam(GETTIME_WEEKDAY) || is_gm()) return; mesc l("In whom to vote?"); select .@list$; @@ -253,7 +253,7 @@ function script POL_Candidate { } // Cast the vote - #POL_VOTEDAY=gettimeparam(GETTIME_DAYOFMONTH); + #POL_VOTEDAY[POL_LocToTP(getarg(0))]=gettimeparam(GETTIME_WEEKDAY); .@vt=getd(.@str$); setd(.@str$, .@vt+1); @@ -283,8 +283,8 @@ function script POL_TownInfo { // Town Managment -// POL_MANAGE( TOWNCODE ) -function script POL_TownInfo { +// POL_Manage( TOWNCODE ) +function script POL_Manage { .@town$="$"+getarg(0); .@MAYOR$=getd("$"+getarg(0)+"_MAYOR$"); -- cgit v1.2.3-60-g2f50