WoW:API UnitIsAFK: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Move page script moved page API UnitIsAFK to API UnitIsAFK without leaving a redirect) |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
= | {{wowapi}} __NOTOC__ | ||
Checks if a unit is AFK. | |||
isAFK = UnitIsAFK("unit") | |||
=== Arguments === | === Arguments === | ||
;unit : The [[UnitId]] to return AFK status of. | |||
=== Returns === | === Returns === | ||
; isAFK | |||
: | : true if unit is AFK, false otherwise. | ||
== Example == | == Example == | ||
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 |
Latest revision as of 04:47, 15 August 2023
Checks if a unit is AFK.
isAFK = UnitIsAFK("unit")
Arguments[edit]
- unit
- The UnitId to return AFK status of.
Returns[edit]
- isAFK
- true if unit is AFK, false 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