Wowpedia
Advertisement
Wowpedia
240,442
pages

Shows the tooltip for the specified spell.

GameTooltip:SetSpellBookItem(spellBookId, bookType);

Arguments

spellBookId
number - the id of the spell on the tab from the spellbook - not the same as SpellId
bookType
string - Either BOOKTYPE_SPELL ("spell") or BOOKTYPE_PET ("pet").

Details

  • Find the spellBookId as follows:
local i = 1
while true do
	local spell = GetSpellBookItemName(i, BOOKTYPE_SPELL)
	if (not spell) then
		break
	end
	DEFAULT_CHAT_FRAME:AddMessage(i..": "..spell)
	i = i + 1
end

Example

GameTooltip:SetSpellBookItem(46, BOOKTYPE_SPELL)
Advertisement