WoW:API CallCompanion: Difference between revisions
Jump to navigation
Jump to search
(Initial creation) |
m (Move page script moved page API CallCompanion to API CallCompanion without leaving a redirect) |
||
(6 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{wowapi}} | {{wowapi}} | ||
Summons the specified companion. New in [[Patch 3.0]] | Summons the specified companion. New in [[Patch 3.0]] | ||
CallCompanion("type", id) | 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]] |
Latest revision as of 04:45, 15 August 2023
← WoW API < CallCompanion
Summons the specified companion. New in Patch 3.0
CallCompanion("type", id)
Arguments[edit]
- 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[edit]
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