Method WorldObject:SpawnCreature [-] [+]

Spawns the creature at specified location.

enum TempSummonType
{
    TEMPSUMMON_TIMED_OR_DEAD_DESPAWN       = 1, // despawns after a specified time OR when the creature disappears
    TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN     = 2, // despawns after a specified time OR when the creature dies
    TEMPSUMMON_TIMED_DESPAWN               = 3, // despawns after a specified time
    TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT = 4, // despawns after a specified time after the creature is out of combat
    TEMPSUMMON_CORPSE_DESPAWN              = 5, // despawns instantly after death
    TEMPSUMMON_CORPSE_TIMED_DESPAWN        = 6, // despawns after a specified time after death
    TEMPSUMMON_DEAD_DESPAWN                = 7, // despawns when the creature disappears
    TEMPSUMMON_MANUAL_DESPAWN              = 8, // despawns when UnSummon() is called
    TEMPSUMMON_TIMED_OOC_OR_CORPSE_DESPAWN = 9, // despawns after a specified time (OOC) OR when the creature dies
    TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN   = 10 // despawns after a specified time (OOC) OR when the creature disappears
};

Synopsis

spawnedCreature = WorldObject:SpawnCreature( entry, x, y, z, o )

spawnedCreature = WorldObject:SpawnCreature( entry, x, y, z, o, spawnType )

spawnedCreature = WorldObject:SpawnCreature( entry, x, y, z, o, spawnType, despawnTimer )

Arguments

number entry

Creature's entry ID.

Valid numbers: integers from 0 to 4,294,967,295.

number x

Valid numbers: all decimal numbers.

number y

Valid numbers: all decimal numbers.

number z

Valid numbers: all decimal numbers.

number o

Valid numbers: all decimal numbers.

TempSummonType spawnType (MANUAL_DESPAWN)

Defines how and when the creature despawns.

number despawnTimer (0)

Despawn time in milliseconds.

Valid numbers: integers from 0 to 4,294,967,295.

Returns

Creature spawnedCreature
See method description.

Generated on 11/04/2018
©2016 - Eluna Lua Engine