WoW:API CastShapeshiftForm: Difference between revisions
Jump to navigation
Jump to search
Submitted by Naliya
(added an new test macro , couldn't get the old to work) |
(Total reformat. Not many factual changes.) |
||
Line 1: | Line 1: | ||
<center> | __NOTOC__ | ||
<center>'''Submitted by [[/User:Naliya|Naliya]]'''</center> | |||
- | Casts Shapeshift on yourself. This is class dependant - not all classes have special abilites. | ||
CastShapeshiftForm(index); | |||
Druid | |||
*1 = Bear/Dire Bear Form | == Parameters == | ||
*2 = Aquatic Form | |||
*3 = Cat Form | === Arguments === | ||
*4 = Travel Form | ;index : relates to the different forms: | ||
*5 = Moonkin Form | |||
Rogue | :;Druid | ||
*1 = Stealth | :*1 = Bear/Dire Bear Form | ||
Warrior | :*2 = Aquatic Form | ||
*1 = Battle Stance | :*3 = Cat Form | ||
*2 = Defensive Stance | :*4 = Travel Form | ||
*3 = Beserker Stance | :*5 = Moonkin Form | ||
: | |||
:;Rogue | |||
:*1 = Stealth | |||
: | |||
:;Warrior | |||
:*1 = Battle Stance | |||
:*2 = Defensive Stance | |||
:*3 = Beserker Stance | |||
=== Returns === | |||
:'''nil''' | |||
== Example == | |||
CastShapeshiftForm(1); | |||
=== Result === | |||
Shapeshifts caster into Bear Form. | |||
== Note == | |||
Note, casting the spell again changes back to caster form. So, for instance; | |||
if (GetNumShapeshiftForms()==1) then CastShapeshiftForm(1);end; | |||
In this case, the script checks if you're in Bear/Dire Bear form, and if so, casts the spell to change you back to Caster form. | |||
It has the same restrictions as other casting spells in that the trigger event needs to involve a keystroke or mouse click. | |||
To use a particular shape in a '''macro''' and avoiding error messages, use: | |||
/script icon, name, active = GetShapeshiftFormInfo('''index''');if (active==1) then CastShapeshiftForm('''index''');end; | |||
where | where '''index''' is the number of the shape as given above. | ||
{{API | ---- | ||
{{WoW API}} |
Revision as of 22:45, 23 May 2006
Casts Shapeshift on yourself. This is class dependant - not all classes have special abilites.
CastShapeshiftForm(index);
Parameters
Arguments
- index
- relates to the different forms:
- Druid
- 1 = Bear/Dire Bear Form
- 2 = Aquatic Form
- 3 = Cat Form
- 4 = Travel Form
- 5 = Moonkin Form
-
- Rogue
- 1 = Stealth
-
- Warrior
- 1 = Battle Stance
- 2 = Defensive Stance
- 3 = Beserker Stance
Returns
- nil
Example
CastShapeshiftForm(1);
Result
Shapeshifts caster into Bear Form.
Note
Note, casting the spell again changes back to caster form. So, for instance;
if (GetNumShapeshiftForms()==1) then CastShapeshiftForm(1);end;
In this case, the script checks if you're in Bear/Dire Bear form, and if so, casts the spell to change you back to Caster form. It has the same restrictions as other casting spells in that the trigger event needs to involve a keystroke or mouse click.
To use a particular shape in a macro and avoiding error messages, use:
/script icon, name, active = GetShapeshiftFormInfo(index);if (active==1) then CastShapeshiftForm(index);end;
where index is the number of the shape as given above.