System Vote Kick System

simonake

New Member
Reaction score
72
Simonake

Presents Vote Kick System 1.2

FAQ

The system is designed to add justice to your games. For example, if some one is killing his/her allys or doing anything wrong, red, can send an attempt to kick the player by his/her color. Here comes the beauty of a vote system, it's not because red hates someone that he will get kick. The vote needed are the total number of players less one because a "Bser" would obiously vote -no It can last a maximun of 45 seconds. If after 45 seconds the number of vote is not enuf high, the request will fail. When a player types -yes, the vote number is increased. When a player type -no, the vote number is decreased. (Only red can call a kick)

GUI Triggers.
Command are -ok and - no
To call the request it's -kick (color)
System disigned for 12 players.

Version 1.0
Version 1.1(Minor Changes)
Version 1.2(Minor Changes)

Triggers
Here are the triggers (5). I strongly suggest you download the map and copy triggers instead of re-doing it at all.

Trigger:
  • Map initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set PlayerColor[1] = -kick red
      • Set PlayerColor[2] = -kick blue
      • Set PlayerColor[3] = -kick teal
      • Set PlayerColor[4] = -kick purple
      • Set PlayerColor[5] = -kick yellow
      • Set PlayerColor[6] = -kick orange
      • Set PlayerColor[7] = -kick green
      • Set PlayerColor[8] = -kick pink
      • Set PlayerColor[9] = -kick gray
      • Set PlayerColor[10] = -kick light blue
      • Set PlayerColor[11] = -kick dark green
      • Set PlayerColor[12] = -kick brown

Trigger:
  • Start the Vote
    • Events
      • Player - Player 1 (Red) types a chat message containing < > as a Substring
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Entered chat string) Equal to_PlayerColor[1]
          • (Entered chat string) Equal to PlayerColor[2]
          • (Entered chat string) Equal to PlayerColor[3]
          • (Entered chat string) Equal to PlayerColor[4]
          • (Entered chat string) Equal to PlayerColor[5]
          • (Entered chat string) Equal to PlayerColor[6]
          • (Entered chat string) Equal to PlayerColor[7]
          • (Entered chat string) Equal to PlayerColor[8]
          • (Entered chat string) Equal to PlayerColor[9]
          • (Entered chat string) Equal to PlayerColor[10]
          • (Entered chat string) Equal to PlayerColor[11]
          • (Entered chat string) Equal to PlayerColor[12]
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Entered chat string) Equal to PlayerColor[(Integer A)]
            • Then - Actions
              • Set PlayerToKick = (Player((Integer A)))
              • Game - Display to (All players) for 45.00 seconds the text: (A request to kick + ((Name of PlayerToKick) + has been sent. To kick him type -ok, to refuse the kick type -no))
              • Countdown timer - Start Timer as a Un coup timer that will expire in 45.00 seconds
              • Countdown timer - Create a timer window for Timer with title (Player to kick: + (Name of (Player((Integer A)))))
              • Set Timer = (Last started timer)
              • Set TimerWindow = (Last created timer window)
              • Set TotalVotes = (Number of players in (All players controlled by a User player))
              • Set VotesToReach = (TotalVotes - 1)
              • Set VotesReached = 0
              • Trigger - Turn off (This trigger)
              • Trigger - Turn on Voting NO <gen>
              • Trigger - Turn on Voting yes <gen>
            • Else - Actions
          • Set PlayerVote[(Integer A)] = TRUE

Trigger:
  • Voting yes
    • Events
      • Player - Player 1 (Red) types a chat message containing -ok as Equivalent Result
      • Player - Player 2 (Blue) types a chat message containing -ok as Equivalent Result
      • Player - Player 3 (Teal) types a chat message containing -ok as Equivalent Result
      • Player - Player 4 (Purple) types a chat message containing -ok as Equivalent Result
      • Player - Player 5 (Yellow) types a chat message containing -ok as Equivalent Result
      • Player - Player 6 (Orange) types a chat message containing -ok as Equivalent Result
      • Player - Player 7 (Green) types a chat message containing -ok as Equivalent Result
      • Player - Player 8 (Pink) types a chat message containing -ok as Equivalent Result
      • Player - Player 9 (Gray) types a chat message containing -ok as Equivalent Result
      • Player - Player 10 (Light Blue) types a chat message containing -ok as Equivalent Result
      • Player - Player 11 (Dark Green) types a chat message containing -ok as Equivalent Result
      • Player - Player 12 (Brown) types a chat message containing -ok as Equivalent Result
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayerVote[(Player number of (Triggering player))] Equal to TRUE
        • Then - Actions
          • Set VotesReached = (VotesReached + 1)
          • Set PlayerVote[(Player number of (Triggering player))] = FALSE
          • Game - Display to (All players) the text: ((( + (String(VotesReached))) + (/ + ((String(VotesToReach)) + ))))
        • Else - Actions
          • Game - Display to (Player group((Triggering player))) the text: Don't try to vote a...
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • VotesReached Greater Than of Equal to VotesToReach
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Trigger - Turn off Voting NO <gen>
          • Game - Defeat PlayerToKick with the message: YOU HAVE BEN KICKED!
          • Trigger - Turn on Start the Vote <gen>
          • Game - Display to (All players) the text: ((Name of PlayerToKick) + has been kicked.)
          • Countdown timer - Destroy TimerWindow
          • Trigger- Turn on Start the Vote <gen>
        • Else - Actions

Trigger:
  • Voting NO
    • Events
      • Player - Player 1 (Red) types a chat message containing -no as Equivalent Result
      • Player - Player 2 (Blue) types a chat message containing -no as Equivalent Result
      • Player - Player 3 (Teal) types a chat message containing -no as Equivalent Result
      • Player - Player 4 (Purple) types a chat message containing -no as Equivalent Result
      • Player - Player 5 (Yellow) types a chat message containing -no as Equivalent Result
      • Player - Player 6 (Orange) types a chat message containing -no as Equivalent Result
      • Player - Player 7 (Green) types a chat message containing -no as Equivalent Result
      • Player - Player 8 (Pink) types a chat message containing -no as Equivalent Result
      • Player - Player 9 (Gray) types a chat message containing -no as Equivalent Result
      • Player - Player 10 (Light Blue) types a chat message containing -no as Equivalent Result
      • Player - Player 11 (Dark Green) types a chat message containing -no as Equivalent Result
      • Player - Player 12 (Brown) types a chat message containing -no as Equivalent Result
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayerVote[(Player number of (Triggering player))] Equal to TRUE
        • Then - Actions
          • Set VotesReached = (VotesReached - 1)
          • Set PlayerVote[(Player number of (Triggering player))] = FALSE
          • Game - Display to (All players) the text: ((( + (String(VotesReached))) + (/ + ((String(VotesToReach)) + ))))
        • Else - Actions

Trigger:
  • Timer Expires
    • Events
      • Time - Timer expires
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • VotesReached Greater Than or Equal to VotesToReach
        • Then - Actions
          • Then - Defeat PlayerToKick with the message: YOU HAVE BEN KICKED!
          • Trigger - Turn on Start the Vote <gen>
          • Game - Display to (All players) the text: ((Name of PlayerToKick) + has been kicked.)
          • Countdown timer - Destroy TimerWindow
          • Trigger - Turn on Start the Vote <gen>
          • Trigger - Turn on Voting Yes <gen>
          • Trigger - Turn off Voting NO <gen>
        • Else - Actions
          • Game - Display to (All players) the text: Vote is refused! Tr...
          • Countdown timer - Destroy TimerWindow
          • Trigger - Turn on Start the Vote <gen>

This is what's done so far. Upgrades are probally going to be made. Enjoy system, no Credits needed but appreciated. Map Below.
(Find bug, leaks. Tell it and changelog will be made)
 

Attachments

  • Kick system.w3x
    20.3 KB · Views: 248

Romek

Super Moderator
Reaction score
963
> Command are -yes and - no
> types a chat message containing -ok as Equivalent Result
...
 

Romek

Super Moderator
Reaction score
963
I was pointing out that either your triggers or your 'FAQ' is incorrect.
Also, you do realise that Wc3 is actually a 12 player game. Not an 8 player game.
 

Flare

Stops copies me!
Reaction score
662
most of the game doesn't contains 12 players.
If you want people to be able to use this system, it should be able to handle any number of players. Just because most maps supposedly have only 8 players (which is far from true IMO, I've seen alot of maps with more than 8 players) doesn't mean you shouldn't cater for other maps. It's a simple change, but it is quite necessary IMO
 

simonake

New Member
Reaction score
72
Trigger:
  • For each (Integer Bump) do 13 (Actions)
    • Loop -
      • Unit - This Tread has been bumped. 13 times <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" />


Can't it get aprooved?
 

wraithseeker

Tired.
Reaction score
122
Strings and integers don't leak, thats what in JASS is at least. Didn't I remember that Votekick systems were already submitted long ago?

Is this MUI? It should be.
 

simonake

New Member
Reaction score
72
Well, only player can be kicked at the same time..

typing -yes1, -no2 would be to complicated to do and to understand.
 

wraithseeker

Tired.
Reaction score
122
Well since this is a system, it should be MUI.
Some map makers might want to allow 3 kicking at once or something.
 

Undead Me

New Member
Reaction score
5
Thanks very much, this system works very well.

One thing to consider might be making it so you can have 2 or more different systems, if there is more than 1 team. For example, in dota if Red wanted to kick teal because teal fed brown might vote -no because he likes being fed.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top