From 699b9247d7fad000141d815d867f6efee4d6be22 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 9 Sep 2019 17:24:49 -0300 Subject: 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. --- npc/functions/politics.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'npc') 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); -- cgit v1.2.3-60-g2f50