Thread Tools Display Modes
05/16/14, 07:54 PM   #1
pinmouse
Join Date: Mar 2014
Posts: 7
Thumbs up Dungeon Levels on Map Tooltip

Would love an addon that shows the dungeon's level in the tool tip when you mouse over it on the map. That is all. Thanks!!!
  Reply With Quote
05/21/14, 11:04 AM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by pinmouse View Post
Would love an addon that shows the dungeon's level in the tool tip when you mouse over it on the map. That is all. Thanks!!!
I made a simple addon that will show levels for points of interest (if this information is available):



To install this addon you have to create folder "POILevels" inside of "Documents\Elder Scrolls Online\Live\AddOns\". And then in "POILevels" folder create two text files:

POILevels.txt:
Code:
## Title: |cFFFFB0POI Levels|r 0.1 - By |c00C000Garkin|r
## Version: 0.1
## Author: Garkin
## APIVersion: 100003

POILevels.lua
POILevels.lua:
Lua Code:
  1. local function AddLevel(pin)
  2.    local poiIndex = pin:GetPOIIndex()
  3.    local zoneIndex = pin:GetPOIZoneIndex()
  4.    local _, level = GetPOIInfo(zoneIndex, poiIndex)
  5.    local name = ZO_WorldMapMouseoverName:GetText()
  6.  
  7.    if level > 0 then
  8.       ZO_WorldMapMouseoverName:SetText(zo_strformat("[<<1>>] <<t:2>>", level, name))
  9.    end
  10. end
  11.  
  12. local function OnLoad(code, name)
  13.    if name ~= "POILevels" then return end
  14.  
  15.    local CreatorPOISeen = ZO_MapPin.TOOLTIP_CREATORS[MAP_PIN_TYPE_POI_SEEN].creator
  16.    ZO_MapPin.TOOLTIP_CREATORS[MAP_PIN_TYPE_POI_SEEN].creator = function(pin)
  17.       CreatorPOISeen(pin)
  18.       AddLevel(pin)
  19.    end
  20.    local CreatorPOIComplete = ZO_MapPin.TOOLTIP_CREATORS[MAP_PIN_TYPE_POI_COMPLETE].creator
  21.    ZO_MapPin.TOOLTIP_CREATORS[MAP_PIN_TYPE_POI_COMPLETE].creator = function(pin)
  22.       CreatorPOIComplete(pin)
  23.       AddLevel(pin)
  24.    end
  25.  
  26.    EVENT_MANAGER:UnregisterForEvent("POILevels_OnLoad", EVENT_ADD_ON_LOADED)
  27. end
  28.  
  29. EVENT_MANAGER:RegisterForEvent("POILevels_OnLoad", EVENT_ADD_ON_LOADED, OnLoad)

Last edited by Garkin : 05/21/14 at 12:28 PM. Reason: Changed way to get name in order to make it compatible with my http://pastebin.com/Q0ZsR9PJ
  Reply With Quote

ESOUI » AddOns » AddOn Search/Requests » Dungeon Levels on Map Tooltip


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off