WoW:API CallCompanion: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
Line 34: Line 34:


[[Category:World of Warcraft API]]
[[Category:World of Warcraft API]]
== Random Pet Macro ==
/run CallCompanion("CRITTER", random(GetNumCompanions("CRITTER")))

Revision as of 01:22, 14 August 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")))