No categories assigned

LUA:GetSpawnByGroupID

Revision as of 18:24, 11 September 2013 by Jabantiz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LUA Functions: GetSpawnByGroupID()

Gets a spawn in the given zone with the given group ID


Syntax

var = GetSpawnByGroupID(param1, param2)


Parameters

Required - param1 (Zone), param2 (int32)
param1 is the zone you want to look in for the given group
param2 is the ID of the group you want


Usage

function hailed(NPC, Spawn)
    local zone = GetZone(Spawn)
    local Spawn2 = GetSpawnGroupByID(zone, 1234)
    Attack(Spawn2, Spawn)
end

When the NPC is hailed it will make the spawn group with an ID of 1234 attack the player

Notes

Returns a spawn