API CastSpell

Casts a spell from the spellbook.
 CastSpell(spellIndex, spellbookType)
==Arguments==
:;spellIndex: - index of the spell to cast.
:;spellbookType: - spellbook to cast the spell from; one of 
:* BOOKTYPE_SPELL ("spell") for player spells
:* BOOKTYPE_PET ("pet") for pet abilities
==Details==
* This function cannot be used from insecure execution paths except to "cast" trade skills (e.g. Cooking, Alchemy).
==Patch changes==
==See also==
*