-- LUA Script - precede every function and global member with lowercase name of script + '_main' local monitoring = {} local zoneList = {'Town','Ranch','Lake','Forest','Desert', 'Path1','Path2','Path3','Path4','Path5'} function zone_test2_init(e) end function zone_test2_main(e) -- check to see if zone.lua is loaded if MonitorZoneOn == nil then return end for _,zone in pairs(zoneList) do if not monitoring[zone] then monitoring[zone] = MonitorZoneOn(zone) else if PlayerEnteredZone(zone) then PromptDuration('Player entered zone: ' .. zone, 3000) return end if PlayerExitedZone(zone) then PromptDuration('Player left zone: ' .. zone, 3000) return end end end if g_KeyPressE == 1 then local zones = ZonesPlayerIn() if zones and #zones > 0 then local zStr = '' for _,v in pairs(zones) do zStr = zStr .. ' ' .. v end Prompt('Player currently in zones:' .. zStr) else Prompt('Player not currently in any zone') end end end