ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Any way to get all map numbers for submaps? (https://www.esoui.com/forums/showthread.php?t=4512)

SnowmanDK 03/29/15 04:46 PM

Any way to get all map numbers for submaps?
 
Hi

I need to make a table of all submaps including the numbers.
Does a table already exist somewhere, or is there a way to get them without having to enter each and every one?

I need somthing like this for all zones:
Lua Code:
  1. [4] = {         -- Stormhaven
  2.         {28},   -- Bonesnap Ruins
  3.         {30},   -- Wayrest Sewers
  4.         {128}-- Portdun Watch
  5.         {129}-- Koeglin Mine
  6.         {130}-- Pariah Catacombs
  7.         {131}-- Farangel's Delve
  8.         {132}-- Bearclaw Mine
  9.         {133}-- Norvulk Ruins
  10.     },

circonian 03/29/15 05:14 PM

Garkin made one & posted it here: http://www.esoui.com/forums/showthread.php?p=12693#post12693

Although yes you could do it yourself. I didn't log in & test this, but something like this would work:
Lua Code:
  1. local zoneTable = {}
  2. for zoneIndex = 1, 2000 do
  3.     local zoneName = GetZoneNameByIndex(zoneIndex)
  4.     if zoneName ~= "" then
  5.         zoneTable[zoneIndex] = zoneName
  6.     end
  7. end

SnowmanDK 03/29/15 05:23 PM

Exactly what I need, thanks a lot :D

Case closed :banana:

Quote:

Originally Posted by circonian (Post 20039)
Garkin made one & posted it here: http://www.esoui.com/forums/showthread.php?p=12693#post12693

Although yes you could do it yourself. I didn't log in & test this, but something like this would work:
Lua Code:
  1. local zoneTable = {}
  2. for zoneIndex = 1, 2000 do
  3.     local zoneName = GetZoneNameByIndex(zoneIndex)
  4.     if zoneName ~= "" then
  5.         zoneTable[zoneIndex] = zoneName
  6.     end
  7. end



All times are GMT -6. The time now is 08:11 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI