Difference between revisions of "LUA:KillSpawnByDistance"

(Created page with "= LUA Functions: KillSpawnByDistance() = Kills all the spawns within the given distance of the given spawn ==== Syntax ==== KillSpawnByDistance(param1, param2, [param3], [param...")
 
(No difference)

Latest revision as of 20:55, 11 September 2013

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