API CastSpellByName

CastSpellByName(spellName{, onSelf});

Arguments

 * name : String - Name of the spell to cast. Rank is optional, if omitted, highest possible is picked automatically.
 * onSelf : Boolean - Should the spell be cast on the player (vs target)? If no target exists and the onSelf evaluates to false, cursor is switched to casting mode.

Example
CastSpellByName("Flash Heal(Rank 2)"); -- Cast Flash Heal (Rank 2) on target. CastSpellByName("Flash Heal"); -- Cast Flash Heal (Highest rank) on target. CastSpellByName("Flash Heal",1); -- Cast Flash Heal (Highest rank) on self.