WoW API: DoEmote

From AddOn Studio
Revision as of 06:40, 22 August 2008 by WoWWiki>Recompense (Formatting)
Jump to navigation Jump to search

WoW API < DoEmote


DoEmote("token"[, "player"]);


Executes an emote.


Arguments
("token", "player")
token
String - the token that describes which emote is being used. See Emotes Tokens
target
Any - if a string or number is set for this argument, the emote will behave as if no target were selected.

Returns
Nothing.

Details
Executes one of the emotes based on the given token, including vocal emotes. The list of currently valid emotes is given in ChatFrame.lua, defined as one of the EMOTEx_TOKEN constants. x starts at 1 and currently goes up to 171 (as of 2.1.2). Certain emotes may also trigger character animations and sound effects.
As of August 21, 2008 (2.4.3), if the function has only the first argument, it automatically produces a targeted emote if a target exists or a non-targeted emote if none exists. Supplying a string or number to the "target" argument appears to force the function to behave as if no target were selected, regardless of an actual target.