WoW:API DoEmote: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Move page script moved page API DoEmote to API DoEmote without leaving a redirect)
 
(13 intermediate revisions by 12 users not shown)
Line 1: Line 1:
<center>'''DoEmote''' ''-Documentation by [[user:Xenoveritas|Xenoveritas]]-''</center>
{{wowapi}}__NOTOC__


<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
DoEmote("token" [,"target"]);


DoEmote("token", "message");
<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->


<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->
== Parameters ==
=== Arguments===
 
:("token" [, "target"])


Executes an emote.
:;token : String - the token that describes which emote is being used. See [[API_TYPE_Emotes_Token|Emotes Tokens]]


----
:;target : String - [[UnitId]] of who the emote will be performed on. If nil, then it performs the emote on your current target, or yourself if you don't have a target. If the specified target does not exist or is out of range, then it performs the emote on yourself.
;''Arguments''
<!-- List each argument, together with its type -->


:("token", "message")
=== Returns ===
:;token : String - the token that describes which emote is being used.  It is one of the emotes defined in ChatFrame.lua, as EMOTE<i>x</i>_TOKEN.
:;message : String - target / additional command for the emote?  It appears that if this is a player name, then the emote is "done" to the player for emotes that support that.


----
:;nil
;''Returns''


<!-- List each return value, together with its type -->
== Usage ==
:Nothing.
=== Example ===


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


<!-- Details not appropriate for the main description can go here -->
=== Notes ===
: 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 EMOTE<i>x</i>_TOKEN constants.  <i>x</i> starts at 1 and currently goes up to 170 (as of 1.3.0).  Certain emotes may also trigger character animations and sound effects.


----
* 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 EMOTE''x''_TOKEN constants. ''x'' starts at 1 and goes up to ChatFrame.lua's local variable MAXEMOTEINDEX (which is 452 in WotLK 3.3.0).
{{Template:WoW API}}
* Emotes in TextEmoteSpeechList will trigger vocal effects. (defined in ChatFrame.lua)
<!-- Update the category to the appropriate subsection, and be sure to put the function name as the label for the category link. Multiple subcategories are okay if appropriate, please dont link functions to the API Functions category directly. -->
* Emotes in EmoteList will trigger animation effects. (defined in ChatFrame.lua)
[[Category:API Functions|DoEmote]]
* It is unclear whether two these lists contain all valid animation or speech effects, however.
[[Category:API Communication Functions|DoEmote]]
[[Category:API Chat Functions|DoEmote]]

Latest revision as of 04:45, 15 August 2023

WoW API < DoEmote

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


Parameters[edit]

Arguments[edit]

("token" [, "target"])
token
String - the token that describes which emote is being used. See Emotes Tokens
target
String - UnitId of who the emote will be performed on. If nil, then it performs the emote on your current target, or yourself if you don't have a target. If the specified target does not exist or is out of range, then it performs the emote on yourself.

Returns[edit]

nil

Usage[edit]

Example[edit]

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","none");  -- Regardless of whether or not you have Bob selected, you will see:
                   --   You cry.

Notes[edit]

  • 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)
  • It is unclear whether two these lists contain all valid animation or speech effects, however.