[lua] function flightEnd() and function self frame UNIT_AURA(unitID)
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
- local flightEnd = function()
- ontaxi = nil
- onupdate(self, 3)
- self:UnregisterEvent("UNIT_AURA")
- end
- function self:UNIT_AURA(unitID)
- if unitID == "player" and GetUnitSpeed(unitID) < 32 and self:IsShown() then
- if string.find( GetSubZoneText(), destination) or string.find( GetZoneText(), destination) then --Ironforge is actually called City of Ironforge, Feathermoon is actually Feathermoon Stronghold
- flightEnd()
- elseif GetSubZoneText() == "Hatchet Hills" then --Zul'Aman flightpath lands not in Zul'aman, Ghostlands, both string-finders above won't recognize it lol
- flightEnd()
- elseif GetSubZoneText() == "Sun's Reach Harbor" then --SS Staging Area flightpath lands in Sun's Reach Harbor, Isle of Quel'Danas, both string-finders above won't recognize it -.-
- flightEnd()
- else
- print (destination.." didn't match "..GetSubZoneText().." or "..GetZoneText()) --should never print, but annoying as it is, makes the error pretty obvious
- end
- end
- end
Editor
You can edit this paste and save as new: