Lua PerformIngameSpawn

From ArcEmu-Wiki
Jump to: navigation, search

Spawns ingame a unit or a game object.

Contents

Syntax

Unit:
PerformIngameSpawn(1, entry id, map, x, y, z, o, faction, duration [, equip1, equip2, equip3, instance id, save])
Game Object:
PerformIngameSpawn(2, entry id, map, x, y, z, o, scale, duration)


Arguments

spawntype: 1=Unit, 2=Game Object

scale: value in percent (f.ex. 100)

duration: value in seconds, 0=forever


Example

Puts an eastergg where the player stands

local x,y,z,o = pPlayer:GetLocation()
local m = pPlayer:GetMapId()
PerformIngameSpawn(2, 113768, m, x, y, z, o, 100, 0)

Note

This command doesn't write anything into the db. This means if your reload the world db these objects don't respawn. Use WorldDBQuery(sql) to write into the database instead.

Personal tools