Auto_Dismount Simple

Tired of constantly missing kills because you press an ability but and up SOARING off into the sky instead! AutoDismount will automatically dismount you when you land!

File Details

DismountOnLanding (2).zip

  • R
  • Dec 1, 2024
  • 1.05 KB
  • 270
  • 11.0.7
  • Retail

File Name

DismountOnLanding (2).zip

Supported Versions

  • 11.0.7

local addon = CreateFrame("Frame") local wasFalling = false local fallStartTime = 0 local dismountScheduled = false local delay = 0.6 local minFallTime = 0.25 local function TryDismount() dismountScheduled = false if IsMounted() and not IsFalling() and not UnitOnTaxi("player") then Dismount() end end addon:SetScript("OnUpdate", function(self, elapsed) if not IsMounted() or UnitOnTaxi("player") then wasFalling = false fallStartTime = 0 dismountScheduled = false return end local now = GetTime() local falling = IsFalling() if falling then if not wasFalling then fallStartTime = now end wasFalling = true return end if wasFalling and not falling and not dismountScheduled then local fallDuration = now - fallStartTime wasFalling = false fallStartTime = 0 if fallDuration >= minFallTime then dismountScheduled = true C_Timer.After(delay, TryDismount) end end end)