Emotes API
Perform emotes and check emote availability.
Functions
perform
emotes:perform(emote_name: string) -> boolean
Perform an emote. Opens the emotes tab, scrolls if needed, clicks the emote, and verifies the animation started.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
emote_name | string | Yes | Emote name (use emotes.Emote.EMOTE_NAME) |
Returns:
boolean- True if the emote was successfully performed and animation started
Example:
if emotes:perform(emotes.Emote.WAVE) then
logger:info("Waved at someone!")
end
available
emotes:available() -> table
Get a list of all available emote names.
Returns:
table- Array of emote name strings
Example:
local all_emotes = emotes:available()
logger:info("Total emotes: " .. #all_emotes)
for _, name in ipairs(all_emotes) do
logger:info(" - " .. name)
end
Emote Constants
Available emotes (use emotes.Emote.EMOTE_NAME):
Basic Emotes
- YES
- NO
- BOW
- ANGRY
- THINK
- WAVE
- SHRUG
- CHEER
- BECKON
- LAUGH
- JUMP_FOR_JOY
- YAWN
- DANCE
- JIG
- SPIN
- HEADBANG
- CRY
- BLOW_KISS
- PANIC
- RASPBERRY
- CLAP
- SALUTE
Unlockable Emotes
- GOBLIN_BOW
- GOBLIN_SALUTE
- GLASS_BOX
- CLIMB_ROPE
- LEAN
- GLASS_WALL
- IDEA
- STAMP
- FLAP
- SLAP_HEAD
- ZOMBIE_WALK
- ZOMBIE_DANCE
- SCARED
- RABBIT_HOP
Exercise Emotes
- SIT_UP
- PUSH_UP
- STAR_JUMP
- JOG
Special Emotes
- ZOMBIE_HAND
- HYPERMOBILE_DRINKER
- SKILL_CAPE
- AIR_GUITAR
- URI_TRANSFORM
- SMOOTH_DANCE
- CRAZY_DANCE
- PREMIER_SHIELD
- EXPLORE
- BULL_ROARER
Common Patterns
Perform Emote for Clue Scroll
local function do_clue_emote()
-- Perform the emote
if emotes:perform(emotes.Emote.PANIC) then
logger:info("Performed panic emote for clue")
sleep(2000) -- Wait for animation
return true
end
logger:warn("Failed to perform panic emote")
return false
end
Random Idle Emote
local function random_emote()
local idle_emotes = {
emotes.Emote.YAWN,
emotes.Emote.STRETCH,
emotes.Emote.SHRUG,
emotes.Emote.THINK
}
local emote = idle_emotes[math.random(#idle_emotes)]
emotes:perform(emote)
end
-- Use as anti-ban measure
if math.random(100) < 5 then
random_emote()
end
Goblin Diplomacy Quest Helper
local function goblin_diplomacy_emotes()
-- Perform the emotes in sequence
if not emotes:perform(emotes.Emote.GOBLIN_BOW) then
logger:warn("Failed to perform Goblin Bow emote")
return false
end
sleep(3000)
if not emotes:perform(emotes.Emote.GOBLIN_SALUTE) then
logger:warn("Failed to perform Goblin Salute emote")
return false
end
sleep(3000)
return true
end
Wait for Emote to Complete
local function perform_and_wait(emote)
if not emotes:perform(emote) then
return false
end
-- Wait for animation to finish (player returns to idle)
local wait_time = 0
while wait_time < 10000 do
local player = players:local_player()
if player and player:animation_id() == -1 then
break
end
sleep(100)
wait_time = wait_time + 100
end
return true
end
perform_and_wait(emotes.Emote.SKILL_CAPE)
logger:info("Skill cape emote completed!")
Related APIs
- Players API - Check player animation status
- Skills API - Check for skill cape emote requirements
Notes
- Emotes require the emotes tab to be open (API handles this automatically)
- Some emotes require scrolling in the emotes panel (API handles this)
- The
performfunction verifies the animation started before returning true - Locked emotes will cause
perform()to return false (animation won't start) - Skill cape emote requires wearing a skill cape or max cape