Difference between revisions of "LUA:GetZone"

(Created page with "= LUA Functions: GetZone() = Gets the current zone for the given spawn ==== Syntax ==== var = GetZone(param1) ==== Parameters ==== ; Required - ''param1'' (Spawn) : ''param1'...")
 
(No difference)

Latest revision as of 19:42, 11 September 2013

LUA Functions: GetZone()

Gets the current zone for the given spawn


Syntax

var = GetZone(param1)


Parameters

Required - param1 (Spawn)
param1 is the spawn who's current zone we want to get


Usage

function hailed(NPC, Spawn)
    local zone = GetZone(Spawn)
    Say(NPC, "You are in " .. GetZoneName(zone))
end

The NPC will respond with the name of the zone the player is currently in

Notes

Returns a Zone