• 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] DotA- Afk-Command

Status
Not open for further replies.
Level 27
Joined
Feb 22, 2006
Messages
3,052
Just set a timer that restarts every time a unit is issued an order for that player.
  • AfkTimerReset
    • 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 AfkTimer[(Player number of (Owner of (Triggering unit)))] = 0
  • AfkTimerIncrease
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set AfkTimer[(Integer A)] = (AfkTimer[(Integer A)] + 1)
  • AfkTimerDisplay
    • Events
      • Player - Player 1 (Red) types a chat message containing -afk as An exact match
      • Player - Player 2 (Blue) types a chat message containing -afk as An exact match
      • Player - Player 3 (Teal) types a chat message containing -afk as An exact match
      • Player - Player 4 (Purple) types a chat message containing -afk as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -afk as An exact match
      • Player - Player 6 (Orange) types a chat message containing -afk as An exact match
      • Player - Player 7 (Green) types a chat message containing -afk as An exact match
      • Player - Player 8 (Pink) types a chat message containing -afk as An exact match
      • Player - Player 9 (Gray) types a chat message containing -afk as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -afk as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -afk as An exact match
      • Player - Player 12 (Brown) types a chat message containing -afk as An exact match
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: (Player + ((String((Player number of (Player((Integer A)))))) + ( has been AFK for + ((String(AfkTimer[(Integer A)])) + seconds.))))
--donut3.5--
 
Status
Not open for further replies.
Top