API:GetZoneIDList
From RoR Wiki
UI Lua API · Map functions
Version: WAR 1.4.8
Returns the ids of all zones in the client's zone data.
zoneIds = GetZoneIDList()
Arguments
None.
Returns
- zoneIds
table– Array of zone ids (number), indexed from 1.
Details
- The list is read from the client's game data files, not from the server. Entries that have a particular flag set in that data are left out.
- Several ids can share a name, and some have an empty name. The stock UI removes duplicate names itself.
- If the Lua state is not available, the function returns nothing.
Errors
None.
Example
From default/ea_socialwindow/source/socialwindowtabsearch.lua:
local zoneIDs = GetZoneIDList()
-- loop over all the zone names, some are blank, some are "Dangerous Territory"
for index, zoneID in ipairs( zoneIDs )
do
-- get the zone name for this zoneID
zoneName = GetZoneName(zoneID)
...
