diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-09-09 17:24:49 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-09-09 17:24:49 -0300 |
commit | 699b9247d7fad000141d815d867f6efee4d6be22 (patch) | |
tree | d7289a4c178051cdc5a5fd748715629310db6a5c /npc | |
parent | 8df106c0fb7a325c501e70f53b89950856491779 (diff) | |
download | serverdata-699b9247d7fad000141d815d867f6efee4d6be22.tar.gz serverdata-699b9247d7fad000141d815d867f6efee4d6be22.tar.bz2 serverdata-699b9247d7fad000141d815d867f6efee4d6be22.tar.xz serverdata-699b9247d7fad000141d815d867f6efee4d6be22.zip |
You cannot vote on yourself... But an alt char will do the trick.
That would be the middle term. As a result, LoF and Frostia are harder.
Diffstat (limited to 'npc')
-rw-r--r-- | npc/functions/politics.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt index 0b02aa0c5..d4c939570 100644 --- a/npc/functions/politics.txt +++ b/npc/functions/politics.txt @@ -206,9 +206,16 @@ function script POL_Candidate { if (.@vote < 0) return; + // You cannot vote on yourself + .@str$="$"+getarg(0)+"_VOTES"+"["+.@vote+"]"; + if (getd(.@str$) == strcharinfo(0)) { + mesc l("You cannot vote on yourself!"), 1; + // mesc l("Use an alt char to do that."); + return; + } + // Cast the vote #POL_VOTEDAY=gettimeparam(GETTIME_DAYOFMONTH); - .@str$="$"+getarg(0)+"_VOTES"+"["+.@vote+"]"; .@vt=getd(.@str$); setd(.@str$, .@vt+1); |