WoW API: DoEmote

From AddOn Studio
Jump to navigation Jump to search

WoW API < DoEmote

DoEmote("token" [,onPlayer]);


Parameters

Arguments

("token", onPlayer)
token
String - the token that describes which emote is being used. See Emotes Tokens
onPlayer
Boolean - If true, the emote will behave as if no target were selected (ie. performs it on the player).

Returns

nil

Usage

Example

DoEmote("cry");    -- Say you have 'Bob' selected.  You see:   You cry on Bob's shoulder.
                   -- If you have no target, you see:          You cry.
DoEmote("cry",1);  -- Regardless of whether or not you have Bob selected, you will see:
                   --   You cry.

Notes

  • Executes one of the emotes based on the given token, including vocal emotes and animations. The list of currently valid emotes is given in ChatFrame.lua, defined as one of the EMOTEx_TOKEN constants. x starts at 1 and goes up to MAXEMOTEINDEX (which is 451 in WotLK 3.0.3).
  • Emotes in TextEmoteSpeechList will trigger vocal effects. (defined in ChatFrame.lua)
  • Emotes in EmoteList will trigger animation effects. (defined in ChatFrame.lua)
  • It is unclear whether two these lists contain all valid animation or speech effects, however.
  • You cannot use the second option to specify a target, only to specify the absence of a target.