Thread Tools Display Modes
12-06-06, 11:38 PM   #1
THursdae
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 4
[Help] Entering a new Zone - Gets name and shows

Basically for this addon im working on... When i enter a new zone, I want it to detect this happening, then grab the name of the zone (GetRealZoneText()), so i can use it to put up a message.

Anyone have help? Im a noob and have only made one addon so go easy on me Thanks
  Reply With Quote
12-16-06, 04:38 AM   #2
xbjim
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 58
try registering the "MINIMAP_ZONE_CHANGED" event then when thats fired off get the GetRealZoneText().

something like:

Code:
function MyAddon_OnEvent()
    if event == "MINIMAP_ZONE_CHANGED" then
        message(GetRealZoneText())
    end
end

MyAddon = CreateFrame("Frame")
MyAddon:SetScript("OnEvent", MyAddon_OnEvent)
MyAddon:RegisterEvent("MINIMAP_ZONE_CHANGED")

Last edited by xbjim : 12-16-06 at 10:24 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » [Help] Entering a new Zone - Gets name and shows


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