PickupSpellBookItem

From Warcraft Wiki
Jump to navigation Jump to search
Flavors
Links
Info
Added in 4.0.1 / 1.13.2

Picks up a skill from spellbook so that it can subsequently be placed on an action bar.

PickupSpellBookItem(spell)
PickupSpellBookItem(index, bookType)

Arguments

spell
number|string - Spell ID or Name. When passing a name requires the spell to be in your Spellbook.
Spellbook args  
index
number - Spellbook slot index, ranging from 1 through the total number of spells across all tabs and pages.
bookType
string - BOOKTYPE_SPELL or BOOKTYPE_PET depending on if you wish to query the player or pet spellbook.
Internally the game only tests if this is equal to "pet" and treats any other string value as "spell".
Constant Value Description
BOOKTYPE_SPELL "spell" The General, Class, Specs and Professions tabs[1]
BOOKTYPE_PET "pet" The Pet tab

Example

The following sequence of macro commands places the Cat Form ability into the current action bar's first slot.

/run PickupSpellBookItem("Cat Form")
/click ActionButton1
/run ClearCursor()

Patch changes

Cataclysm Patch 4.0.1 (2010-10-12): Added. Replaces some PickupSpell() functionality.