WoW:API CallCompanion: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
==Arguments== | ==Arguments== | ||
;type : String - The type of companion to summon or dismiss ("CRITTER", or "MOUNT"). | ;type : String ([[companionType]]) - The type of companion to summon or dismiss ("CRITTER", or "MOUNT"). | ||
;id : Integer - The companion index to summon or dismiss (ascending integers starting from 1). | ;id : Integer - The companion index to summon or dismiss (ascending integers starting from 1). | ||
Revision as of 23:40, 5 June 2010
← WoW API < CallCompanion
Summons the specified companion. New in Patch 3.0
CallCompanion("type", id)
Arguments
- type
- String (companionType) - The type of companion to summon or dismiss ("CRITTER", or "MOUNT").
- id
- Integer - The companion index to summon or dismiss (ascending integers starting from 1).
Example
The following macro summons the [alphabetically] first critter your character has acquired:
/run CallCompanion("CRITTER",1)
The following macro summons a random critter your character has acquired:
/run CallCompanion("CRITTER", random(GetNumCompanions("CRITTER")))
Note that there is an API call to do exactly that, see API_SummonRandomCritter