Voting System Help

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

Black-Hole
Forum Fanatic
Posts: 315
Joined: October 16th, 2007, 7:32 pm

Voting System Help

Post by Black-Hole »

I need to know how to make a voting trigger. I want a trigger that will allow the players to vote on eather a Gold income ingame or where they have to fight to get gold. I got the triggers for the income and gold fighting i just need a voting system to make them work. Please help me
<(' '<) KIRBY!!!
User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

Re: Voting System Help

Post by Ozzapoo »

GUI would be "terribly long and inefficient" (quote from Aero)... Jass would be easier... Because all you would have to do is copy the code ;)
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
Black-Hole
Forum Fanatic
Posts: 315
Joined: October 16th, 2007, 7:32 pm

Re: Voting System Help

Post by Black-Hole »

Im not good at jass code :(
So i would be better off just taking the Long Unefficent GUI code.

Can somone post the Long Unefficent GUI code?
Ozzapoo wrote:GUI would be "terribly long and inefficient" (quote from Aero)... Jass would be easier... Because all you would have to do is copy the code ;)
User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

Re: Voting System Help

Post by Ozzapoo »

Would you like a time limit on how long they have to vote?
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
Black-Hole
Forum Fanatic
Posts: 315
Joined: October 16th, 2007, 7:32 pm

Re: Voting System Help

Post by Black-Hole »

Ya can there be a 10sec Vote time. Thx for helping me make this trigger!! :D
User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

Re: Voting System Help

Post by Ozzapoo »

Ok Done:

Variables Required:

Code: Select all

Name              Type                     Array
Button1          Dialog Button             No
Button2          Dialog Button             No
ModeVotes         Integer                  Yes(2)
VoteDialog        Dialog                   No
Triggers:

Code: Select all

Vote Counting
    Events
        Dialog - A dialog button is clicked for VoteDialogs
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked dialog button) Equal to Button1
            Then - Actions
                Set ModeVotes[1] = (ModeVotes[1] + 1)
                Cinematic - Clear the screen of text messages for (All players)
                Game - Display to (All players) the text: (|CFF1AFF00Income Gold: |R + (String(ModeVotes[1])))
                Game - Display to (All players) the text: (|CFFFF0000Bounty Gold: |R + (String(ModeVotes[2])))
            Else - Actions
                Set ModeVotes[2] = (ModeVotes[2] + 1)
                Cinematic - Clear the screen of text messages for (All players)
                Game - Display to (All players) the text: (|CFF1AFF00Income Gold: |R + (String(ModeVotes[1])))
                Game - Display to (All players) the text: (|CFFFF0000Bounty Gold: |R + (String(ModeVotes[2])))

Code: Select all

Initialize Dialog
    Events
        Time - Elapsed game time is 2.00 seconds
    Conditions
    Actions
        Dialog - Change the title of VoteDialogs to Vote Gold Mode
        Dialog - Create a dialog button for VoteDialogs labelled Income Gold
        Set Button1 = (Last created dialog Button)
        Dialog - Create a dialog button for VoteDialogs labelled Bounty Gold
        Set Button2 = (Last created dialog Button)
        Wait 3.00 seconds
        Game - Display to (All players) the text: Please vote the gol...
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                Dialog - Show VoteDialogs for (Player((Integer A)))
        Wait 10.00 seconds
        For each (Integer A) from 1 to 12, do (Actions)
            Loop - Actions
                Dialog - Hide VoteDialogs for (Player((Integer A)))
        Game - Display to (All players) the text: Voting time ended!
        Wait 2.00 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ModeVotes[1] Greater than or equal to ModeVotes[2]
            Then - Actions
                Game - Display to (All players) the text: Game Mode: INCOME G...
                -------- Put what you want to do here... --------
            Else - Actions
                Game - Display to (All players) the text: Game Mode: BOUNTY G...
                -------- Put what you want to do here... --------
You can add to it if you want... see attached map...

This was a rather simple task ;)
You do not have the required permissions to view the files attached to this post.
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
User avatar
nederlands
Newcomer
Posts: 13
Joined: April 9th, 2008, 5:14 pm

Re: Voting System Help

Post by nederlands »

Then - Actions
Game - Display to (All players) the text: Game Mode: INCOME G...
-------- Put what you want to do here... --------
Else - Actions
Game - Display to (All players) the text: Game Mode: BOUNTY G...
-------- Put what you want to do here... --------

Code: Select all

            Then - Actions
                Game - Display to (All players) the text: Game Mode: INCOME G...
                Trigger - Turn on Income <gen>
            Else - Actions
                Game - Display to (All players) the text: Game Mode: BOUNTY G...
                Player Group - Pick every player in (All players) and do (Player - Turn gives bounty on for (Picked player))

Code: Select all

Income Trigger

Events
Time - Every 30.00 Seconds of game time

Action
Player Group - Pick every player in (All players) and do (Player - Add 100 to (Picked player) Current gold)
Ps. Right click on the Trigger and put Initially off.
If i did something wrong please tell me =]
Warcraft 3 Player,
Info Below:
Spoiler:
Chieftain of Clan W4R (100 members)
Chieftain of Clan Bot (10 Members(Bots))
Friends with clan WaR
@ EUROPE!
Ow! And Some stuff about me!:)
Spoiler:
Name: Andy Haverhoek
Country: Netherlands
Age: 16
Hobby's: Cheating wc3 Maps
Games: warcraft3& Zoo tycoon(H)
Hyves: http://andy-hav.hyves.nl/ (Same as myspace only Dutch)