• 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.

Kick System help

Status
Not open for further replies.
Level 7
Joined
Sep 19, 2007
Messages
81
HI i need some help on a kick trigger i already have that works if you are red but can any1 tell me how to do it like this,
Your Allowed to kick people if your red or your name is SlashingMachine, wolfman, space-sheep and if you are those 3 names u cant be kicked
 
  • Angry
Reactions: Rui
Level 14
Joined
Nov 4, 2006
Messages
1,241
there is a player name comparison in conditions, just put all those names with OR conditions together, you need two triggers

  • Events
    • Player1 types a message with kick player2
  • Conditions
  • Actions
    • if name of player in slot 2 is not equal to "put all your names here" then kick player
the "2" was just an example, make it general

  • Events
    • Player 1 types message...
    • Player 2 types message ...
  • ...
  • Conditions
    • name of triggering player equal to "put all your names here"
  • Actions
    • kick player in slot "your string"
its just a rough thing, don't have WE here, but maybe it helps
 
Level 8
Joined
May 27, 2007
Messages
170
It can be done in one trigger I believe. Here's how I would do it.

  • Kick System
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick player as A substring
      • Player - Player 2 (Blue) types a chat message containing -kick player as A substring
      • Player - Player 3 (Teal) types a chat message containing -kick player as A substring
      • Player - Player 4 (Purple) types a chat message containing -kick player as A substring
      • Player - Player 5 (Yellow) types a chat message containing -kick player as A substring
      • Player - Player 6 (Orange) types a chat message containing -kick player as A substring
      • Player - Player 7 (Green) types a chat message containing -kick player as A substring
      • Player - Player 8 (Pink) types a chat message containing -kick player as A substring
      • Player - Player 9 (Gray) types a chat message containing -kick player as A substring
      • Player - Player 10 (Light Blue) types a chat message containing -kick player as A substring
      • Player - Player 11 (Dark Green) types a chat message containing -kick player as A substring
      • Player - Player 12 (Brown) types a chat message containing -kick player as A substring
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering player) Equal to Player 1 (Red)
          • (Name of (Triggering player)) Equal to SlashingMachine
          • (Name of (Triggering player)) Equal to Wolfman
          • (Name of (Triggering player)) Equal to Space Sheep
    • Actions
      • Set PlayerToKick = (Player((Integer((Substring((Entered chat string), 14, 14))))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • PlayerToKick Not equal to Player 1 (Red)
              • (Name of PlayerToKick) Not equal to SlashingMachine
              • (Name of PlayerToKick) Not equal to Wolfman
              • (Name of PlayerToKick) Not equal to Space Sheep
        • Then - Actions
          • Game - Defeat PlayerToKick with the message: Defeat!
        • Else - Actions
          • Game - Display to (Player group((Triggering player))) the text: That player can't b...
Here is an explanation since you say you are noob :grin:

PlayerToKick is just a simple Player variable. Now what this basically does is everytime someone types -kick player anywhere in there chat message, the trigger will run. So for example, if I typed Hello my name is Fred -kick player what is your name? the trigger would still run because the event is that a player types that as a SUBSTRING, not an exact match. It wouldn't actually do anything, but it's just important to know that it will still run.

Now the next bit sets up your player variable, this is basically just to establish who is potentially going to be kicked. It does this by fetching a number out of a certain position of the message that was typed. (Player((Integer((Substring((Entered chat string), 14, 14)))))) means that the trigger is searching for the 14th character in the chat string, which if a player has typed it in correctly will be a reference to a palyer number. So for example if we use Hello my name is Fred -kick player what is your name? then the 14th character is a space, and nothing will happen. If we use -kick player number 1 then the 14th character is 'n' so it has to be done correctly, e.g. -kick player 1. See below, the 14th character (including spaces) is the player number.

1=-
2=k
3=i
4=c
5=k
6=(space)
7=p
8=l
9=a
10=y
11=e
12=r
13=(space)
14=1

When your setting that variable, when you click on the bit to choose the player, you need to select Convert Player Index To Player then Convert String To Integer and then Substring in the drop down menus.

Finally we need to do an If function to check that the player up for kicking isn't one of your special players, by using an OR function. This means that if any of the conditions are true it will still run, whereas it would normally only run if all were true without the OR function. The Then actions simply kick the player out of the game if he is found not to be any of the players that are immune to kicking.

Hope that helps :thumbs_up:
 
Last edited:
Level 4
Joined
Jul 24, 2008
Messages
108
  • kick blue
    • Events
      • Player - Player 1 (Red) types a chat message containing -boot blue as An exact match
      • Player - Player 1 (Red) types a chat message containing -kick blue as An exact match
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units owned by Player 2 (Blue)) and do (Unit - Remove (Picked unit) from the game)
      • Game - Display to (All players) the text: ((Name of Player 2 (Blue)) + ( + has been kicked))
      • Game - Defeat Player 2 (Blue) with the message: You were kicked :)
      • Trigger - Turn off (This trigger)
just add the correct condition to check the player name
 
Status
Not open for further replies.
Top