Kicking System!

Level 4
Joined
Dec 3, 2007
Messages
78
Kicking System


Code:

  • Kick Blue
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick blue as An exact match
    • Conditions
      • (Player 2 (Blue) slot status) Equal to Is playing
    • Actions
      • Game - Defeat Player 2 (Blue) with the message: The host has kicked...
      • Game - Display to (All players) the text: The host has kicked...
Code:

  • Kick Teal
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick teal as An exact match
    • Conditions
      • (Player 3 (Teal) slot status) Equal to Is playing
    • Actions
      • Game - Defeat Player 3 (Teal) with the message: The host has kicked...
      • Game - Display to (All players) the text: The host has kicked...
Code:

  • Kick Purple
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick purple as An exact match
    • Conditions
      • (Player 4 (Purple) slot status) Equal to Is playing
    • Actions
      • Game - Defeat Player 4 (Purple) with the message: The host has kicked...
      • Game - Display to (All players) the text: The host has kicked...
Code:

  • Kick Yellow
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick yellow as An exact match
    • Conditions
      • (Player 5 (Yellow) slot status) Equal to Is playing
    • Actions
      • Game - Defeat Player 5 (Yellow) with the message: The host has kicked...
      • Game - Display to (All players) the text: The host has kicked...
Code:

  • Kick Orange
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick orange as An exact match
    • Conditions
      • (Player 6 (Orange) slot status) Equal to Is playing
    • Actions
      • Game - Defeat Player 6 (Orange) with the message: The host has kicked...
      • Game - Display to (All players) the text: The host has kicked...
Code:

  • Kick Green
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick green as An exact match
    • Conditions
      • (Player 7 (Green) slot status) Equal to Is playing
    • Actions
      • Game - Defeat Player 7 (Green) with the message: The host has kicked...
      • Game - Display to (All players) the text: The host has kicked...
Code:

  • Kick Pink
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick pink as An exact match
    • Conditions
      • (Player 8 (Pink) slot status) Equal to Is playing
    • Actions
      • Game - Defeat Player 8 (Pink) with the message: The host has kicked...
      • Game - Display to (All players) the text: The host has kicked...
Code:

  • Kick Gray
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick gray as An exact match
    • Conditions
      • (Player 9 (Gray) slot status) Equal to Is playing
    • Actions
      • Game - Display to (All players) the text: The host has kicked...
      • Game - Defeat Player 9 (Gray) with the message: The host has kicked...
Code:

  • Kick Light Blue
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick light blue as An exact match
    • Conditions
      • (Player 10 (Light Blue) slot status) Equal to Is playing
    • Actions
      • Game - Defeat Player 10 (Light Blue) with the message: The host has kicked...
      • Game - Display to (All players) the text: The host has kicked...
Code:

  • Kick Dark Green
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick dark green as An exact match
    • Conditions
      • (Player 11 (Dark Green) slot status) Equal to Is playing
    • Actions
      • Game - Defeat Player 11 (Dark Green) with the message: The host has kicked...
      • Game - Display to (All players) the text: The host has kicked...
Code:

  • Kick Brown
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick brown as An exact match
    • Conditions
      • (Player 12 (Brown) slot status) Equal to Is playing
    • Actions
      • Game - Defeat Player 12 (Brown) with the message: The host has kicked...
      • Game - Display to (All players) the text: The host has kicked...
-Doggie :thumbs_up:
 
Last edited by a moderator:
Level 11
Joined
Aug 25, 2006
Messages
971
Besides, it's much funner to crash their wc3.
JASS:
if GetLocalPlayer()==YourPlayer then
    call ExecuteFunc("LOL U GOT PWNED ROFLBBQSAWCE!")
endif
Its also fun to desynch them without a message.
JASS:
if GetLocalPlayer()==YourPlayer then
    call DisableTrigger(APlayerHasLeftMessageTrig)
    call CreateUnit (0,'h000',0,0,30)
endif
This desynchs them and turns off the trigger that tells them a player has left. (Otherwise that trigger would tell him that every player but him left)
 
Level 10
Joined
Jan 21, 2007
Messages
576
Jesus christ guys, he tried and is'nt as advanced as you so let's negative rep him. How immature are you? Nice try at the triggers doggie_man, but you can do it in GUI still but simpler. You should try experimenting with loop integer A's it makes alot of things easier and should still be easy enough for you to learn, heres an example of something you can do with it:

  • Kick System
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick player as A substring
    • Conditions
    • Actions
      • For each (Integer A) from 2 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Substring((Entered chat string), 14, (Length of (Entered chat string)))) Equal to (String((Integer A)))
            • Then - Actions
              • Game - Defeat (Player((Integer A))) with the message: C-C-C-C-C-COMBO BREAKER...
            • Else - Actions
This runs the 'if then else' with the numbers 2-12, and i have it checking if the substring 14,to end of the entered chatstring (For example the substring 2,3 of grunt would be "ru") is equal to the number it is currently checking with, if it is it kicks that player. This is extremly simple stuff but we all start somewhere ;) Good luck man :thumbs_up:

And guys lets keep the sarcasm down lol.
 
Level 10
Joined
Jan 21, 2007
Messages
576
Just did it it works, maybe i copied it wrong sorry got notepad open with leak checker in it might mixed some crap up second. Checking.
 
Level 10
Joined
Jan 21, 2007
Messages
576
O yea i know, i was copying and pasting stuf ;0. Anyways it works perfectly now lol.
 
Level 11
Joined
Aug 25, 2006
Messages
971
Its ok, doggie_man, the time I used GUI still far outweighs the time I have used JASS. The editor tends to have quite a steep learning curve. The editor's crappy JASS debugger sure didn't help me. Anyway, good luck in further ventures!
 
Level 9
Joined
May 27, 2006
Messages
498
Few days ago i made a topic bout votekick system... Here are the triggers:

Variables:
aa_vote_in_progress - BDLBQ, used to stop starting new vote if there is another running already.
aa_kick_player_num - C, number of player that is being voted to kick him.
aa_[number]_have_voted - BDLBQ, used to stop players voting 2 times on one votekick.
yesvotes - C, number of votes to kick player.
novotes - C, number of votes to dont kick player.
Players - C, used as number of players able to vote.


  • call votekick
    • Events
      • Player - Player 1 (Red) types a chat message containing -votekick as Substring.
      • Player - Player 2 (Blue) types a chat message containing -votekick as ... etc. etc. for 10 player (red - lightblue)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • aa_vote_in_progress Equal to True
        • Then - Actions
          • Game - Display to (Player group((Triggering player))) the text: |cff8080FFVote hint...
          • Skip remaining actions
        • Else - Actions
      • Set aa_kickplayer_num = (Integer((Substring((Entered chat string), 11, (Length of (Entered chat string))))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Player(aa_kickplayer_num)) slot status) Equal to leaves the game
        • Then - Actions
          • Game - Display to (Player group((Triggering player))) the text: |cff8080FFVote hint...
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Player(aa_kickplayer_num)) slot status) Equal to not used
        • Then - Actions
          • Game - Display to (Player group((Triggering player))) the text: |cff8080FFVote hint...
          • Skip remaining actions
        • Else - Actions
      • Game - Display to (All players) the text: ((|cff8080FFVote hint -|r + (|cffffcc00 + (Name of (Triggering player)))) + ( |rhas started votekick against |cffffcc00 + ((Name of (Player(aa_kickplayer_num))) + |r.)))
      • Set aa_vote_in_progress = True
      • Trigger - Turn on vote yes 1 <gen>
      • Trigger - Turn on vote yes 2 <gen>
      • Trigger - Turn on vote yes 3 <gen> ... etc etc for 10 players (red - lightblue)
      • -------- -------------------------------------------------------------------- --------
      • Trigger - Turn on vote no 1 <gen>
      • Trigger - Turn on vote no 2 <gen>
      • Trigger - Turn on vote no 3 <gen> ... etc etc for 10 players (red - lightblue)
      • -------- -------------------------------------------------------------------- --------
      • Set aa_1_have_voted = False
      • Set aa_2_have_voted = False
      • Set aa_3_have_voted = False
      • Set aa_4_have_voted = False
      • Set aa_5_have_voted = False
      • Set aa_6_have_voted = False
      • Set aa_7_have_voted = False
      • Set aa_8_have_voted = False
      • Set aa_9_have_voted = False
      • Set aa_10_have_voted = False
      • Set yesvotes = 0
      • Set novotes = 0
      • ~Lines starting one shot timer

  • kick and end votekick
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
      • (yesvotes + novotes) Equal to Players
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off vote no 1 <gen>
      • Trigger - Turn off vote no 2 <gen>
      • Trigger - Turn off vote no 3 <gen> ... etc etc up to 10 times.
      • Trigger - Turn off vote no 10 <gen>
      • Trigger - Turn off vote yes 1 <gen>
      • Trigger - Turn off vote yes 2 <gen>
      • Trigger - Turn off vote yes 3 <gen> ... etc etc up to 10 times.
      • Set aa_vote_in_progress = False
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • yesvotes Equal to novotes
        • Then - Actions
          • Game - Display to (All players) the text: (|cff8080FFVote hint -|r + Vote failed - 50% players voted |cffffcc00yes|r, 50% player voted |cffffcc00no|r. Draw.)
          • Set yesvotes = 0
          • Set novotes = 0
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • yesvotes greater than novotes
        • Then - Actions
          • Set yesvotes = 0
          • Set novotes = 0
          • Game - Defeat (Player(aa_kickplayer_num)) with the message: You have been votek...
          • Unit Group - Pick every unit in (Units owned by (Player(aa_kickplayer_num))) and do (Unit - Remove (Picked unit) from the game)
          • Game - Display to (All players) the text: (|cff8080FFVote hint -|r + Vote |cffffcc00passed|r.)
          • Game - Display to (All players) the text: (|cff8080FFVote hint -|r + ((Name of (Player(aa_kickplayer_num))) + has been voteckied.))
          • Game - Display to (All players) the text: (|cff8080FFVote hint -|r + ( + ((String((100 - (novotes x 10)))) + % players voted |cffffcc00yes|r.)))
        • Else - Actions
          • Set yesvotes = 0
          • Set novotes = 0
          • Game - Display to (All players) the text: (|cff8080FFVote hint -|r + Vote |cffffcc00failed|r.)
          • Game - Display to (All players) the text: (|cff8080FFVote hint -|r + ( + ((String((100 - (yesvotes x 10)))) + % players voted |cffffcc00no|r.)))
  • vote yes 1 (same for player 2, 3, ..., 10)
    • Events
      • Player - Player 1 (Red) types a chat message containing -yes as exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • aa_1_have_voted Equal to False
        • Then - Actions
          • Set yesvotes = (yesvotes + 1)
          • Game - Display to (Player group((Triggering player))) the text: |cff8080FFVote hint...
          • Set aa_1_have_voted = True
        • Else - Actions
          • Game - Display to (Player group((Triggering player))) the text: |cff8080FFVote hint...

  • vote no 1 (same for player 2, 3, ..., 10)
    • Events
      • Player - Player 1 (Red) types a chat message containing -no as exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • aa_1_have_voted Equal to False
        • Then - Actions
          • Set novotes = (novotes + 1)
          • Game - Display to (Player group((Triggering player))) the text: |cff8080FFVote hint...
          • Set aa_1_have_voted = True
        • Else - Actions
          • Game - Display to (Player group((Triggering player))) the text: |cff8080FFVote hint...
But there is a problem, this system sometimes crashes... And i dont know how to fix it ;/

Link to original thread:
GUI votekick system crash
 
Level 6
Joined
Nov 28, 2007
Messages
203

  • call votekick
    • Events
      • Player - Player 1 (Red) types a chat message containing -votekick as Substring.
      • Player - Player 2 (Blue) types a chat message containing -votekick as ... etc. etc. for 10 player (red - lightblue)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • aa_vote_in_progress Equal to True
        • Then - Actions
          • Game - Display to (Player group((Triggering player))) the text: |cff8080FFVote hint...
          • Skip remaining actions
        • Else - Actions
      • Set aa_kickplayer_num = (Integer((Substring((Entered chat string), 11, (Length of (Entered chat string))))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Player(aa_kickplayer_num)) slot status) Equal to leaves the game
        • Then - Actions
          • Game - Display to (Player group((Triggering player))) the text: |cff8080FFVote hint...
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Player(aa_kickplayer_num)) slot status) Equal to not used
        • Then - Actions
          • Game - Display to (Player group((Triggering player))) the text: |cff8080FFVote hint...
          • Skip remaining actions
        • Else - Actions
      • Game - Display to (All players) the text: ((|cff8080FFVote hint -|r + (|cffffcc00 + (Name of (Triggering player)))) + ( |rhas started votekick against |cffffcc00 + ((Name of (Player(aa_kickplayer_num))) + |r.)))
      • Set aa_vote_in_progress = True
      • Trigger - Turn on vote yes 1 <gen>
      • Trigger - Turn on vote yes 2 <gen>
      • Trigger - Turn on vote yes 3 <gen> ... etc etc for 10 players (red - lightblue)
      • -------- -------------------------------------------------------------------- --------
      • Trigger - Turn on vote no 1 <gen>
      • Trigger - Turn on vote no 2 <gen>
      • Trigger - Turn on vote no 3 <gen> ... etc etc for 10 players (red - lightblue)
      • -------- -------------------------------------------------------------------- --------
      • Set aa_1_have_voted = False
      • Set aa_2_have_voted = False
      • Set aa_3_have_voted = False
      • Set aa_4_have_voted = False
      • Set aa_5_have_voted = False
      • Set aa_6_have_voted = False
      • Set aa_7_have_voted = False
      • Set aa_8_have_voted = False
      • Set aa_9_have_voted = False
      • Set aa_10_have_voted = False
      • Set yesvotes = 0
      • Set novotes = 0
      • ~Lines starting one shot timer
  • [/QUOTE]
  • Can you really have these Skip remaining actions in this trigger? won't it make WE skip ALL triggers after it?
  • even these?
  • [TRIGGER]
  • Game - Display to (All players) the text: ((|cff8080FFVote hint -|r + (|cffffcc00 + (Name of (Triggering player)))) + ( |rhas started votekick against |cffffcc00 + ((Name of (Player(aa_kickplayer_num))) + |r.)))
  • Set aa_vote_in_progress = True
  • Trigger - Turn on vote yes 1 <gen>
  • Trigger - Turn on vote yes 2 <gen>
  • Trigger - Turn on vote yes 3 <gen> ... etc etc for 10 players (red - lightblue)
  • -------- -------------------------------------------------------------------- --------
  • Trigger - Turn on vote no 1 <gen>
  • Trigger - Turn on vote no 2 <gen>
  • Trigger - Turn on vote no 3 <gen> ... etc etc for 10 players (red - lightblue)
  • -------- -------------------------------------------------------------------- --------
  • Set aa_1_have_voted = False
  • Set aa_2_have_voted = False
  • Set aa_3_have_voted = False
  • Set aa_4_have_voted = False
  • Set aa_5_have_voted = False
  • Set aa_6_have_voted = False
  • Set aa_7_have_voted = False
  • Set aa_8_have_voted = False
  • Set aa_9_have_voted = False
  • Set aa_10_have_voted = False
  • Set yesvotes = 0
  • Set novotes = 0
  • ~Lines starting one shot timer
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Thread cleaned due to excessive spam and flaming. Quit it.

I also edited some posts

  • Added
    tags to the first post because it was so long
    [*]Edited posts that were only partly SPAM/FLAMING/OTHER UNRELATED STUFF so that they're completely related to the topic.


This is a warning, guys. I don't want to see this sort of **** again, or there will be some dishing out of "red".

Oh, and Counter-Flaming is punishable too.
 
Level 9
Joined
May 27, 2006
Messages
498
Can you really have these Skip remaining actions in this trigger? won't it make WE skip ALL triggers after it?
even these?

Yes, if you read the trigger code carefully, you should understand, why i placed skips there where i placed them.


You see, the first line you`ve quoted, this one showing text message, reads, for example: "Vote hint - raft_pl has started votekick against humpadumpa". We dont want to show this message, if votekick is being started against an unused slot player or player, that have been already kicked.
--
  • Set aa_vote_in_progress = True
- this one sets if voting is being called against a player, not an unused slot. Check first actions of the call votekick trigger, ALL actions will be skipped, if this one is true. And shows a proper message, that tells a calling player, that there is a vote already.
--
  • Trigger - Turn on vote yes 1 <gen>
  • (...)
  • Trigger - Turn on vote no 1 <gen>
and rest of actions - We dont want players be able to vote, if there is no set player, that have to be kicked. So, these actions have to be skipped too.


Maybe there is something wrong with this, but anyway its works perfectly, shows the message and stops starting a new vote if there is one already :D And i would be very grateful, if someone would solve the problem that have arised again: this system crashes, and i dont know why.. :confused:

EDIT: I`ve added a map with the whole system (changed it a little bit, to make it easier to edit/understand)


EDIT2: Yay, i fixed the problem, now the system works perfectly! ;P Link: GUI Votekick System v.0,81
 
Last edited:
Level 10
Joined
Jan 21, 2007
Messages
576
Lol, I didn't think anyone saw it ;].

In addition if your are referring to your tutorial :)wink:) I have read it, but I didn't bother making an entire vote styled kick system for the OP because the way he had his original triggers layed out it seemed as if he only wanted the host to have kick power. Ahh, the days of shitty n' irritable wintermaul hosts.
 
Top