System AFK system

istar

New Member
Reaction score
31
its in GUI, i not too sure if someone had created it, but theres some people asking in the forum
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
            • Else - Actions

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

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)
      • 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
        • Else - Actions
          • Game - Display to (All players) the text: No player is curren...

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

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

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
 

Attachments

  • afktest.w3x
    17.9 KB · Views: 222
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top