Guest User

objective tracker disable

a guest
Mar 10th, 2026
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. local OTF = ObjectiveTrackerFrame
  2. local OTFdisabled = false
  3. local hiddenFrame = CreateFrame("Frame")
  4. hiddenFrame:Hide()
  5.  
  6. --disable frame
  7. local function DisableFrame(frame)
  8. if not frame then return false end
  9. --https://warcraft.wiki.gg/wiki/API_pcall
  10. return pcall(function()
  11. frame:UnregisterAllEvents()
  12. frame:SetParent(hiddenFrame)
  13. frame:Hide()
  14. frame:SetAlpha(0)
  15. frame:EnableMouse(false)
  16. if frame:HasScript("OnShow") then
  17. frame:HookScript("OnShow", function(self) self:Hide() end)
  18. end
  19. end)
  20. end
  21.  
  22. --may return false in combat/protected, try again out of combat/later
  23. if OTF and not OTFdisabled then
  24. OTFdisabled = DisableFrame(OTF)
  25. end
Advertisement
Add Comment
Please, Sign In to add comment