• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

[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