Wikia

WoWWiki

API UnitIsAFK

Talk0
101,384pages on
this wiki
Revision as of 15:46, July 11, 2008 by Starlightblunder (Talk | contribs)

(diff) ←Older revision | Latest revision (diff) | Newer revision → (diff)
WoW API < UnitIsAFK

Checks if a unit is AFK.

isAFK = UnitIsAFK("unit")

Arguments Edit

unit 
The UnitId to return AFK status of.

Returns Edit

isAFK 
1 if unit is AFK, nil otherwise.

Example Edit

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

Around Wikia's network

Random Wiki