You are viewing an old version of this page. Return to the latest version.
Version of 18:24, 11 September 2013 by I need to Update My Profile
No categories assigned
LUA:GetSpawnByLocationID
- Last edited 8 years ago by Vlash Nytefall
LUA Functions: GetSpawnByLocationID()
Gets a spawn in the given zone with the given location ID
Syntax
var = GetSpawnByLocationID(param1, param2)
Parameters
- Required - param1 (Zone), param2 (int32)
- param1 is the zone we want to look in
- param2 is the location ID we want to get
Usage
function hailed(NPC, Spawn)
local zone = GetZone(Spawn)
local Spawn2 = GetSpawnByLocationID(zone, Spawn2)
Attack(Spawn2, Spawn)
end
When this NPC is hailed it will force the spawn with a location ID of 1234 to attack the player
Notes
Returns a spawn