Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
No edit summary
Tag: WoW API docs
No edit summary
Tag: WoW API docs
Line 21: Line 21:
   
 
==Example==
 
==Example==
Similar to normal behavior, if you are targeting something <font color="#dda0dd">''"You greet %s with a hearty hello!"''</font>, otherwise <font color="#dda0dd">''"You greet everyone with a hearty hello!"''</font>
+
Similar to <code>/hello</code>, if you are targeting something <font color="#dda0dd">''"You greet %s with a hearty hello!"''</font>, otherwise <font color="#dda0dd">''"You greet everyone with a hearty hello!"''</font>
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
 
DoEmote("HELLO")
 
DoEmote("HELLO")
Line 31: Line 31:
   
 
==See also==
 
==See also==
* For sending custom emote text, see {{api|SendChatMessage}}()
+
* For sending custom emote text like with <code>/emote</code> or <code>/me</code>, see {{api|SendChatMessage}}()

Revision as of 02:50, 22 May 2022

Performs an emote.

restricted = DoEmote(token [, unit, hold])

Arguments

token
string : EmoteToken
unit
string? : UnitId - Who the emote will be performed on. Defaults to the current target.
hold
boolean? - Supposedly holds the emote animation until canceled, like for the /read emote.

Returns

restricted
boolean - If an emote is restricted this tells the UI to show it as an unrecognized chat command.[1]

Details

  • 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 ChatFrame.lua's local variable MAXEMOTEINDEX (which is 452 in WotLK 3.3.0).
    • Emotes in TextEmoteSpeechList will trigger vocal effects. (defined in ChatFrame.lua)
    • Emotes in EmoteList will trigger animation effects. (defined in ChatFrame.lua)
  • Does not require a hardware event.
  • There is a ~0.25 second server-side throttle on performing an emote.
  • Quirk: UnitIDs like "target" do not appear to work on NPCs. It however works to show the target when simply omitting the param.

Example

Similar to /hello, if you are targeting something "You greet %s with a hearty hello!", otherwise "You greet everyone with a hearty hello!"

DoEmote("HELLO")

To ensure an emote is not aimed at a target.

DoEmote("HELLO", "none")

See also

  • For sending custom emote text like with /emote or /me, see SendChatMessage()