• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Kicking System!

Status
Not open for further replies.
Level 4
Joined
Dec 3, 2007
Messages
78
Kicking System
Here Are The Triggers!!!!



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:
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Yes and instead of making a trigger for every player you could make this

  • Unknown
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 5)) Equal to -kick
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 6, 9)) Equal to blue
        • Then - Actions
          • Game - Defeat Player 2 (Blue) with the message: Red has kicked you !
          • Game - Display to (All players) the text: Red has kicked blue
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Substring((Entered chat string), 6, 9)) Equal to teal
            • Then - Actions
              • Game - Defeat Player 3 (Teal) with the message: Red has kicked you !
              • Game - Display to (All players) the text: Red has kicked teal
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Substring((Entered chat string), 6, 11)) Equal to purple
                • Then - Actions
                  • Game - Defeat Player 4 (Purple) with the message: Red has kicked you !
                  • Game - Display to (All players) the text: Red has kicked purp...
                • Else - Actions
      • -------- Etc. for all players --------

By the way someone here knows a script to locate the host ? (yes I know this has nothing to do with GUI ^^)
 
Level 11
Joined
Aug 25, 2006
Messages
971
There is a script to locate the host. Some people say it is inaccurate though. I have used it quite a bit and only once has it had a problem. However I was reading something and if the host has a horrible computer/is in the process of minimizing-maxamizing it might select another player.

My trigger for kicking is about 6 lines of GUI and uses a 50 line function in jass which turns a string "Purple" to Player(3) [Player 4 - Purple is actually Player(3) in JASS]

Also my kick trigger is funny. It creates 50 neutral hostile units for the Local Player (The one you wanted to kick.) This instantly disconnects that person leaving everyone else untouched.
 
Level 5
Joined
Oct 12, 2004
Messages
109
just put this in your map header:

JASS:
function GetHost takes nothing returns nothing
    local gamecache g = InitGameCache("Map.w3v")
    call StoreInteger ( g, "Map", "Host", GetPlayerId(GetLocalPlayer ())+1)
    call TriggerSyncStart ()
    call SyncStoredInteger ( g, "Map", "Host" )
    call TriggerSyncReady ()
    set udg_Host = Player( GetStoredInteger ( g, "Map", "Host" )-1)
    call FlushGameCache( g )
    set g = null
endfunction

Then to use it just use a gui command such as:
  • Custom script: call GetHost()
Then you can use the variable called host to do whatever u want with it.
 
Status
Not open for further replies.
Top