No categories assigned

LUA:KillSpawnByDistance

Revision as of 20:55, 11 September 2013 by Jabantiz (talk | contribs) (Created page with "= LUA Functions: KillSpawnByDistance() = Kills all the spawns within the given distance of the given spawn ==== Syntax ==== KillSpawnByDistance(param1, param2, [param3], [param...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LUA Functions: KillSpawnByDistance()

Kills all the spawns within the given distance of the given spawn


Syntax

KillSpawnByDistance(param1, param2, [param3], [param4])


Parameters

Required - param1 (Spawn), param2 (float)
param1 is the spawn killing all spawns around it
param2 is the distance
Optional - param3 (int8), param4 (int8)
param3 kill players
param4 send packet


Usage

function hailed(NPC, Spawn)
    KillSpawnByDistance(NPC, 25.5, 1, 1)
end

When hailed the NPC will kill all spawns, including players, within 25.5 feet and send the packets

Notes

param3 and param4 will default to false