Guest
Public paste!

Katae

By: a guest | Nov 22nd, 2009 | Syntax: Lua | Size: 0.53 KB | Hits: 91 | Expires: Never
Copy text to clipboard
  1. local cf, coordX, coordY, Coords
  2. if modules.Coords.enabled or modules.Location.enabled then
  3.         cf, coordX, coordY = CreateFrame'frame', 0, 0
  4.         cf:RegisterEvent'ZONE_CHANGED_NEW_AREA'
  5.         cf:SetScript("OnUpdate", function() coordX, coordY = GetPlayerMapPosition'player' end)
  6.         cf:SetScript("OnEvent", function(self, event, ...) if not WorldMapFrame:IsShown() then SetMapToCurrentZone() end end)
  7.         WorldMapFrame:HookScript("OnHide", SetMapToCurrentZone)
  8.         function Coords() return format(modules.Coords.fmt or "%d,%d", coordX*100, coordY*100) end
  9. end