Simonake
Presents Vote Kick System 1.2
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
- Events
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]
- Conditions
- Or - Any (Conditions) are true
- 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
- If - Conditions
- Set PlayerVote[(Integer A)] = TRUE
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- For each (Integer A) from 1 to 12, do (Actions)
- Events
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 - Conditions
- 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
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
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
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
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>
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
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)