WoW:API CastSpellByName: Difference between revisions
Jump to navigation
Jump to search
CastSpellByName -Documentation by Sliver-
mNo edit summary |
No edit summary |
||
| Line 13: | Line 13: | ||
:( syntax ) | :( syntax ) | ||
:;CastSpellByName("spellname(Rank X)") | :;CastSpellByName("spellname(Rank X)") | ||
:;CastSpellByName("spellname") | |||
| Line 19: | Line 20: | ||
;''Result'' | ;''Result'' | ||
: Casts | : Casts Life Tap (This example is warlock specific). When the (Rank X) string is omitted, the ''highest rank of the spell which the user has in his spellbook'' is cast. | ||
---- | ---- | ||
;''Description'' | ;''Description'' | ||
Revision as of 15:44, 5 March 2006
- Arguments
- ( name )
- name
- String - Spell Name(as seen when mouse-over).
- Returns
-
- ??
- Example
- ( syntax )
- CastSpellByName("spellname(Rank X)")
- CastSpellByName("spellname")
CastSpellByName('Life Tap(Rank 2)')
- Result
- Casts Life Tap (This example is warlock specific). When the (Rank X) string is omitted, the highest rank of the spell which the user has in his spellbook is cast.
- Description
- Casts a spell by the spells given name.
- Note:
- You might encounter difficulties when using this on a localized version of WoW.
- See the Unicode part of the Localization HOWTO for more details about editing a source file containing localized strings.
- This problem does only appear when working with Lua source files. When you're using macros, inside the WoW client, it should work in unicode directly.
An FYI, as an antibot measure, this function only operates when called directly from a button click. If you try to call it from an event handler such as OnEvent(event) or OnUpdate(elapsed) it will not work. Template:WoW API