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
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")