WoW:API CastShapeshiftForm: Difference between revisions

Total reformat. Not many factual changes.
(added an new test macro , couldn't get the old to work)
(Total reformat. Not many factual changes.)
Line 1: Line 1:
<center><b[[>API CastShapeshiftForm</b> - <i>Submitted by [[/User:Naliya|Naliya]]</i></center><br>
__NOTOC__
<p>Casts Shapeshift on yourself. This is class dependant - not all classes have special abilites.
<center>'''Submitted by [[/User:Naliya|Naliya]]'''</center>
</p>
<pre>CastShapeshiftForm(#);</pre>


----
Casts Shapeshift on yourself. This is class dependant - not all classes have special abilites.
<p><b><i>Arguments</i></b><br>
 
<br>(# in this case relates to the different forms)<br>
  CastShapeshiftForm(index);
Druid<br>
 
*1 = Bear/Dire Bear Form<br>
== Parameters ==
*2 = Aquatic Form<br>
 
*3 = Cat Form<br>
=== Arguments ===
*4 = Travel Form<br>
;index : relates to the different forms:
*5 = Moonkin Form<br><br>
 
Rogue<br>
:;Druid
*1 = Stealth<br><br>
:*1 = Bear/Dire Bear Form
Warrior<br>
:*2 = Aquatic Form
*1 = Battle Stance<br>
:*3 = Cat Form
*2 = Defensive Stance<br>
:*4 = Travel Form
*3 = Beserker Stance<br>
:*5 = Moonkin Form
</p>
:
:;Rogue
:*1 = Stealth
:
:;Warrior
:*1 = Battle Stance
:*2 = Defensive Stance
:*3 = Beserker Stance
 
 
=== Returns ===
 
:'''nil'''
 
 
== Example ==
  CastShapeshiftForm(1);
 
=== Result ===
Shapeshifts caster into Bear Form.


----
<p><b><i>Returns</i></b><br>
<br>
*Nil</p><br>


----
== Note ==
<p><b><i>Example</i></b><br>
Note, casting the spell again changes back to caster form. So, for instance;
<br><pre>CastShapeshiftForm(1);</pre><br>
  if (GetNumShapeshiftForms()==1) then CastShapeshiftForm(1);end;
<b><i>Result</i></b><br>
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.
<br>Shapeshifts caster into Bear Form.<br></p>
It has the same restrictions as other casting spells in that the trigger event needs to involve a keystroke or mouse click.
<br>Note, casting the spell again changes back to caster form. So, for instance;<br>
<pre>if (GetNumShapeshiftForms()==1) then CastShapeshiftForm(1);end;</pre><br>
<b><i>Result</i></b><br>
<br>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.
<br>It has the same restrictions as other casting spells in that the trigger event needs to involve a keystroke or mouse click.




// i could not get the above macro to work. it might be broken , if you have the same problem as me try the following macro
To use a particular shape in a '''macro''' and avoiding error messages, use:


"/script icon, name, active = GetShapeshiftFormInfo(X);if (active==1) then CastShapeshiftForm(1);end;"
  /script icon, name, active = GetShapeshiftFormInfo('''index''');if (active==1) then CastShapeshiftForm('''index''');end;


where X is the # of the shape (1 for bear)
where '''index''' is the number of the shape as given above.






{{API/Uncategorized}}
----
{{WoW API}}
Anonymous user