Team Ban Voting System

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

Moderator: Cheaters

TechGeek001
Member
Posts: 50
Joined: December 29th, 2007, 7:34 am

Team Ban Voting System

Post by TechGeek001 »

OK, so we all know that guy. The one asshole that insists on ruining a game for a team by being a general jackass.
Is there any way that a player on a team can initiate a team vote in GUI that bans a teammate from the game?

All I know is that the end result should end up something like "defeat player" and "give <all other players on that team> 1500 gold".
Durchdringen
Honorary wc3edit.net Traitor
Posts: 468
Joined: December 10th, 2007, 10:50 pm
Title: The Professional
Location: USA

Re: Team Ban Voting System

Post by Durchdringen »

Yes there is a way, just make a command, then make 2 buttons for options as yes and no, then tally up the yes/no poll, and then have it award the player booted's team 1500 gold.
Do you support Durchdringen? If so, add the spoiler to your sig. Durch cares for you, so show your support for Durch!
Spoiler:
(broken image) Thanks for the support!
TechGeek001
Member
Posts: 50
Joined: December 29th, 2007, 7:34 am

Re: Team Ban Voting System

Post by TechGeek001 »

I've never done anything that sounds anything like what you suggested before. Any tutorials anywhere for that?
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Team Ban Voting System

Post by Aero »

I'll make a demo map later this weekend.
User avatar
CrackUps
Member
Posts: 96
Joined: October 6th, 2007, 12:21 am

Re: Team Ban Voting System

Post by CrackUps »

Heres a map i just made with you system in it all in GUI

http://files.wc3edit.net/download/index ... 20Kick.w3x

How it works:

In game type -vote kick 1 for example
and two options will appear for every member of your team asking if they want them kicked if over half the team select yes then player 1 will be kicked

type -vote kick 2 to vote to kick player 2.

You can only vote for players still in the game and ones who are on your team.

I didnt put in the gold trigger i figured you could do that part yourself its very simple
TechGeek001
Member
Posts: 50
Joined: December 29th, 2007, 7:34 am

Re: Team Ban Voting System

Post by TechGeek001 »

I tested it as far as I could without battlenet people - that is, I typed vote kick 2 and the screen paused and i had to forcibly exit via Task Manager. I'll hopefully have it ready for Battle.net tomorrow where I can test it fully.
You'll be in the Credits, naturally.
Thanks!
User avatar
CrackUps
Member
Posts: 96
Joined: October 6th, 2007, 12:21 am

Re: Team Ban Voting System

Post by CrackUps »

I've never had any problems with it :? I'll have another look at it
TechGeek001
Member
Posts: 50
Joined: December 29th, 2007, 7:34 am

Re: Team Ban Voting System

Post by TechGeek001 »

OK, so I'm bouncing between this and the Generic Voting system topic in hopes of getting something working.

I looked through the triggers you gave me, couldn't find anything wrong (which isn't saying much) and then tested it multiple times. Typing "-vote kick 2" reveals only a blank dialog box with no buttons on it. I had to Alt-F4 out of the game.
Also, I was wondering if there was some way to execute an if-then-else type trigger if yes>no.
Something that would run a trigger based on the player integer.

That way people can vote (in this case) on whether to execute my specially prepared asshole trigger for the given player.

the exact thingamabob that I want to happen is as follows:

-vote kick [#]
if [yes]>[no] do actions
if [kicked player = 2] run [ban_red]
if [kicked player = 2] run [ban_blue]
if [kicked player = 3] run [ban_teal]
if [kicked player = 4] run [ban_purple]
if [kicked player = 5] run [ban_yellow]
Game - Display to (player group [map_west]) for 10.00 seconds the text:That player has been deemed an asshole.
if [no]>[yes] do actions
Game - Display to (player group [map_west]) for 10.00 seconds the text:That player has not been deemed an asshole.

Excuse the terrible GUI grammar :D
TechGeek001
Member
Posts: 50
Joined: December 29th, 2007, 7:34 am

Re: Team Ban Voting System

Post by TechGeek001 »

Sorry for the double post, but this issue is a huge thorn in my map's side.
I copied the triggers over to my map and got the response described in previous post.
I copied same triggers over to a blank map and it worked fine.
Any ideas as to what could be wrong?

EDIT: I have determined that this:

Code: Select all

Vote Kick T1 Copy
    Events
        Player - Player 1 (Red) types a chat message containing a as An exact match
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
            Then - Actions
                Player Group - Pick every player in Player Group - Player 1 (Red) and do (Actions)
                    Loop - Actions
                        Player Group - Add (Picked player) to Voters[1]
                        Dialog - Clear VoteDialog[1]
                        Dialog - Change the title of VoteDialog[1] to (Kick Player  + (KickTargetNumber[1] +  ?))
                        Dialog - Create a dialog button for VoteDialog[1] labelled Yes
                        Set VoteButtons[1] = (Last created dialog Button)
                        Dialog - Create a dialog button for VoteDialog[1] labelled No
                        Set VoteButtons[2] = (Last created dialog Button)
                        Dialog - Show VoteDialog[1] for (Picked player)
            Else - Actions
works on my map, however,

Code: Select all

Vote Kick T1
    Events
        Player - Player 1 (Red) types a chat message containing -vote kick as A substring
        Player - Player 2 (Blue) types a chat message containing -vote kick as A substring
        Player - Player 3 (Teal) types a chat message containing -vote kick as A substring
        Player - Player 4 (Purple) types a chat message containing -vote kick as A substring
        Player - Player 5 (Yellow) types a chat message containing -vote kick as A substring
    Conditions
    Actions
        Set VoteStarter[1] = (Triggering player)
        Set KickTargetNumber[1] = (Substring((Entered chat string), 12, (Length of (Entered chat string))))
        Set KickTarget[1] = (Player((Integer(KickTargetNumber[1]))))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (KickTargetNumber[1] Equal to 1) or ((KickTargetNumber[1] Equal to 2) or ((KickTargetNumber[1] Equal to 3) or ((KickTargetNumber[1] Equal to 4) or (KickTargetNumber[1] Equal to 5))))
                ((Player((Integer(KickTargetNumber[1])))) slot status) Equal to Is playing
            Then - Actions
                Player Group - Pick every player in (All allies of VoteStarter[1]) and do (Actions)
                    Loop - Actions
                        Player Group - Add (Picked player) to Voters[1]
                        Dialog - Clear VoteDialog[1]
                        Dialog - Change the title of VoteDialog[1] to (Kick Player  + (KickTargetNumber[1] +  ?))
                        Dialog - Create a dialog button for VoteDialog[1] labelled Yes
                        Set VoteButtons[1] = (Last created dialog Button)
                        Dialog - Create a dialog button for VoteDialog[1] labelled No
                        Set VoteButtons[2] = (Last created dialog Button)
                        Dialog - Show VoteDialog[1] for (Picked player)
                Trigger - Turn on T1 Vote Yes <gen>
                Trigger - Turn on T1 Vote No <gen>
                Trigger - Turn on Check T1 <gen>
            Else - Actions
                Game - Display to (Player group((Triggering player))) the text: Invalid Player    E...
this does not. I have also deleted all my other triggers in hopes of maybe something going wrong there, but nothing changed. Then I quickly put 'em back.

There are 5 players per team, 2 teams.
Players 1, 2, 3, 4, 5 are on Team 1
Players 6, 7, 8, 9, 10 are on Team 2
each team also has a computer ally - players 11 and 12 respectively.

EDIT (AGAIN):
OK, so I did some screwing around, and found that this worked on my map:

Code: Select all

Vote Kick T1 Copy
    Events
        Player - Player 1 (Red) types a chat message containing -blue as A substring
    Conditions
    Actions
        Dialog - Clear VoteDialog[1]
        Dialog - Change the title of VoteDialog[1] to Kick Blue?
        Dialog - Create a dialog button for VoteDialog[1] labelled Yes
        Set VoteButtons[1] = (Last created dialog Button)
        Dialog - Create a dialog button for VoteDialog[1] labelled No
        Set VoteButtons[2] = (Last created dialog Button)
        Dialog - Show VoteDialog[1] for Player 1 (Red)
I'll do a little more editing, see if this whole deal works. If it does, you've all won a spot high up on the credits list.