View Single Post
05/16/14, 06:02 AM   #11
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
I have found a way how to open town map.

Example with Daggerfall:
Lua Code:
  1. SCENE_MANAGER:Show("worldMap")                      --open WorldMap
  2. ZO_WorldMap_SetMapByIndex(2)                        --2 = Glenumbra
  3. ProcessMapClick(0.2868,0.7441)                      --town coordinates
  4. CALLBACK_MANAGER:FireCallbacks("OnWorldMapChanged") --refresh map
Coordinates are for any point inside of the subzone area on the zone map. In this example I have used coordinates from tooltip on Esohead maps. BTW anyone knows how to open Esohead map at the selected point? I believe that numbers after # are mapCode, zoom, locX, locY. But zoom does not work for me .

Also there is a function that can tell you if there is any subzone at the selected coordinates:
Lua Code:
  1. local locationName, textureFile, widthN, heightN, locXN, locYN = GetMapMouseoverInfo(normalizedMouseX, normalizedMouseY)
If location name is empty string, there is no subzone.
  Reply With Quote