WoW:API CallCompanion: Difference between revisions
Jump to navigation
Jump to search
m (→Example) |
mNo edit summary |
||
| Line 8: | Line 8: | ||
CallCompanion("type", id) | CallCompanion("type", id) | ||
== Parameters == | ==Parameters== | ||
=== Arguments === | ===Arguments=== | ||
<!-- List each argument, together with its type --> | <!-- List each argument, together with its type --> | ||
:("type") | :("type") | ||
| Line 16: | Line 16: | ||
:;id : Integer - The slot id to query (starts at 1). | :;id : Integer - The slot id to query (starts at 1). | ||
=== Returns === | ===Returns=== | ||
<!-- Result of simple test during beta, 9-23-08. May want to check again later. --> | <!-- Result of simple test during beta, 9-23-08. May want to check again later. --> | ||
:''nil'' | :''nil'' | ||
== Example == | ==Example== | ||
<!-- If it helps, include an example here, though it's not required if the usage is self-explanatory --> | <!-- If it helps, include an example here, though it's not required if the usage is self-explanatory --> | ||
<!-- begin code --> | <!-- begin code --> | ||
| Line 26: | Line 26: | ||
<!-- end code --> | <!-- end code --> | ||
===Result=== | |||
<!-- If it helps, include example results here, though they are not required. You're allowed to cheat liberally since WoW isn't a command line language. --> | <!-- If it helps, include example results here, though they are not required. You're allowed to cheat liberally since WoW isn't a command line language. --> | ||
:The first mini-pet you have will be summoned. | :The first mini-pet you have will be summoned. | ||
| Line 35: | Line 35: | ||
[[Category:World of Warcraft API]] | [[Category:World of Warcraft API]] | ||
== Random Pet Macro == | ==Random Pet Macro== | ||
/run CallCompanion("CRITTER", random(GetNumCompanions("CRITTER"))) | /run CallCompanion("CRITTER", random(GetNumCompanions("CRITTER"))) | ||
Revision as of 10:27, 22 November 2009
← WoW API < CallCompanion
Summons the specified companion. New in Patch 3.0
CallCompanion("type", id)
Parameters
Arguments
- ("type")
- type
- String - The TypeID to query (e.g. "CRITTER", or "MOUNT")
- id
- Integer - The slot id to query (starts at 1).
Returns
- nil
Example
CallCompanion("CRITTER",1)
Result
- The first mini-pet you have will be summoned.
Random Pet Macro
/run CallCompanion("CRITTER", random(GetNumCompanions("CRITTER")))