its in GUI, i not too sure if someone had created it, but theres some people asking in the forum
there is 5 triggers
add event for all players
doesnt work for allies controlling allied units
add event for all players
maybe add aeiou substrings too
after adding these, you can use the boolean variable afkenabled as part of the conditions for kicking
i would suggest read these too
http://www.thehelper.net/forums/showthread.php?t=57751
http://www.thehelper.net/forums/showthread.php?t=57750
there is 5 triggers
Trigger:
- afk
- Events
- Time - Every 2.00 seconds of game time
- Conditions
- Actions
- For each (Integer A) from 1 to 12, do (Actions)
- Loop - Actions
- Set afkcounter[(Integer A)] = (afkcounter[(Integer A)] + 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- afkcounter[(Integer A)] Greater than or equal to 150
- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- enablekick[(Integer A)] Equal to False
- Then - Actions
- Player Group - Add (Player((Integer A))) to afkbunch
- Game - Display to (All players) for 5.00 seconds the text: ((Name of (Player((Integer A)))) + ( has been inactive for + ((String((afkcounter[(Integer A)] x 2))) + ( seconds. -kick is enabled for + (Name of (Player((Integer A))))))))
- Set enablekick[(Integer A)] = True
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If - Conditions
- Loop - Actions
- For each (Integer A) from 1 to 12, do (Actions)
- Events
Trigger:
- msg
- Events
- Time - Every 300.00 seconds of game time
- Conditions
- 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
- enablekick[(Integer A)] Equal to True
- Then - Actions
- Game - Display to (All players) for 5.00 seconds the text: Type - afk to see w...
- Else - Actions
- If - Conditions
- 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:
- typeafk
- Events
- Player - Player 1 (Red) types a chat message containing -afk as An exact match
- Conditions
- Actions
- For each (Integer A) from 1 to 12, do (Actions)
- Loop - Actions
- If (enablekick[(Integer A)] Equal to True) then do (Set msg = True) else do (Do nothing)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- msg Equal to True
- Then - Actions
- Game - Display to (All players) the text: The following playe...
- 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
- enablekick[(Integer A)] Equal to True
- Then - Actions
- Game - Display to (All players) the text: (Name of (Player((Integer A))))
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Else - Actions
- Game - Display to (All players) the text: No player is curren...
- If - Conditions
- For each (Integer A) from 1 to 12, do (Actions)
- Events
add event for all players
Trigger:
- antiafk
- Events
- Unit - A unit Is issued an order targeting an object
- Unit - A unit Is issued an order targeting a point
- Unit - A unit Is issued an order with no target
- Conditions
- Actions
- Set afkcounter[(Player number of (Owner of (Triggering unit)))] = 0
- Events
doesnt work for allies controlling allied units
Trigger:
- antiafk2
- Events
- Player - Player 1 (Red) types a chat message containing as A substring
- Conditions
- Actions
- Set afkcounter[(Player number of (Triggering player))] = 0
- Events
add event for all players
maybe add aeiou substrings too
after adding these, you can use the boolean variable afkenabled as part of the conditions for kicking
i would suggest read these too
http://www.thehelper.net/forums/showthread.php?t=57751
http://www.thehelper.net/forums/showthread.php?t=57750