Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API GetSpellAutocast

Last wiki revision 2023-08-13

Returns true if a (pet) spell is autocastable. autocastable, autostate = GetSpellAutocast("spellName" or spellId, bookType)

  • spellName: - the name of the spell.
  • spellId: - the offset (position) of spell in spellbook. SpellId can change when you learn new spells.
  • bookType: - Either BOOKTYPE_SPELL ("spell") or BOOKTYPE_PET ("pet").
  • autocastable: - whether a spell is autocastable.
  • Returns 1 if the spell is autocastable, nil otherwise.
  • autostate: - whether a spell is currently set to autocast.
  • Returns 1 if the spell is currently set for autocast, nil otherwise.
  • As of patch 3.0.3, the only auto-castable spells exist in the pet spellbook (BOOKTYPE_PET).
  • Both return values will be nil in the following conditions:
  • The spell is not autocastable
  • The spell does not exist (or you don't know it)

Source

https://warcraft.wiki.gg/wiki/API_GetSpellAutocast · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.