Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API UnitIsAFK

Last wiki revision 2023-08-13

Returns true if a friendly unit is AFK (Away from keyboard). isAFK = UnitIsAFK(unit)

  • unit:The UnitId to return AFK status of. A nil value throws an error.
  • isAFK: true if unit is AFK, Boolean false otherwise. An invalid or nonexistent unit value also returns false.

If the player is AFK, the following script outputs "You are AFK" to the default chat window. if UnitIsAFK("player") then DEFAULT_CHAT_FRAME:AddMessage("You are AFK"); end

Up until the WOD beta, the return value isAFK used to be 1 instead of true, and nil instead of false.

Source

https://warcraft.wiki.gg/wiki/API_UnitIsAFK · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.