WoWWiki-Sliver@legacy41586915 (talk | contribs) (Casts a spell by the spells given name.) |
DerGhulbus14061@legacy41535029 (talk | contribs) No edit summary |
||
Line 24: | Line 24: | ||
: Casts a spell by the spells given name. |
: Casts a spell by the spells given name. |
||
+ | |||
+ | ---- |
||
+ | ;''Note:'' |
||
+ | : You might encounter difficulties when using this on a localized version of WoW. |
||
+ | : Get the exact name and suffix of the Spell by using the [[GetSpellName]]-function. If the spell's name includes special characters (like ä, á, â,...) you will have to use utf8-escape codes (which you might find [[http://www.allegro-c.de/unicode/zcodes.htm|here]]. |
||
+ | : This is because Lua currently does not support unicode! |
||
+ | |||
+ | : For example, if you're using the german version of the WoW-client, instead of |
||
+ | CastSpellByName("Dämonenrüstung(Rang 1)"); |
||
+ | : you will have to write |
||
+ | CastSpellByName("D\195\164monenr\195\188stung(Rang 1)"); |
||
+ | |||
+ | : This problem does only appear when working with Lua. When you're just using macro it should work with the ä's and ü's. |
||
+ | |||
---- |
---- |
||
{{Template:WoW API}} |
{{Template:WoW API}} |
Revision as of 09:35, 8 March 2005
- Arguments
- ( name )
- name
- String - Spell Name(as seen when mouse-over).
- Returns
-
- ??
- Example
- ( syntax )
- CastSpellByName("spellname(Rank X)")
CastSpellByName('Life Tap(Rank 2)')
- Result
- Casts life tap on player(This example is warlock specific).
- Description
- Casts a spell by the spells given name.
- Note:
- You might encounter difficulties when using this on a localized version of WoW.
- Get the exact name and suffix of the Spell by using the GetSpellName-function. If the spell's name includes special characters (like ä, á, â,...) you will have to use utf8-escape codes (which you might find [[1]].
- This is because Lua currently does not support unicode!
- For example, if you're using the german version of the WoW-client, instead of
CastSpellByName("Dämonenrüstung(Rang 1)");
- you will have to write
CastSpellByName("D\195\164monenr\195\188stung(Rang 1)");
- This problem does only appear when working with Lua. When you're just using macro it should work with the ä's and ü's.
Template:WoW API