Hello everyone,
I have made an addon that auto dismounts enemys that around you.
The goal is to dismount any player around me that is faster then me, so i can go drink a swiftness potion and start killing them.
The addon is based on a toy hack, wich Unlocks Level Requirement, AND removes cooldown.
The toy i'm going to use is called [hardened shell] and dismount the enemy.
It is a 0.5 second cast, wich has to be interrupted right AFTER i casted the toy, (Cuz thats how i reset my toy cooldowns)
This is how it works, i tested it in duel, but soon it wold be great to use in battlegrounds.
So all the addon does is check if player is NOT mounted > check if target is mounted (and in range) > use the toy, interrupt toy AFTER its casted.
Here is the main code of my addon, so for those who are creative and good with Lua, you may want to try or help me.
In order to use the addon, you need Ferib's Pumpkin Tool(my tool) and a Lua Unlocker
Lua code:
Code:
enabledm = false;
stopcast = false
SLASH_AUTODISMOUNTC1 = '/autodm';
local function handler(msg, editbox)
if msg == 'help' then
print("|cffff7d0a[NotSoFast]|cffffffff: this is a Auto Dismount addon wich requires a Lua Unlocker and \124cff0070dd\124Hitem:86584::::::::110:::::\124h[Hardened Shell]\124h\124r. To enable this type '/autodm on' and '/autodm off' to disable (you may also want to use Ferib's Pumpkin Tool for no level requirement and no cooldown).");
elseif msg == 'on' then
enabledm = true
UIErrorsFrame:AddMessage("NotSoFast ON!",green)
print('|cffff7d0a[NotSoFast]|cfff4dc42: |cff41f447Enabled');
elseif msg == 'off' then
enabledm = false
UIErrorsFrame:AddMessage("NotSoFast OFF!",green)
print('|cffff7d0a[NotSoFast]|cfff4dc42: |cfff44141Disabled');
else
print("|cffff7d0a[NotSoFast]|cfff4dc42: Unknown command, use '/autodm help' for more help.");
end
end
SlashCmdList["AUTODISMOUNTC"] = handler;
--[[
function DismountNearby()
if enabledm == true then
if IsMounted() == false then
print("|cffff7d0a[NotSoFast]|cffffffff: Used |cff0070dd[Hardened Shell]|cffffffff on target!");
CastSpellByName("Hardened Shell","target")
SpellStopCasting()
end
end
end
]]
function DismountBG()
if enabledm == true then
if IsMounted() == false then
print("|cffff7d0a[NotSoFast]|cffffffff: Used |cff0070dd[Hardened Shell]|cffffffff on target!");
UseToy(86584)
stopcast = true
end
end
end
local f = CreateFrame("Frame");
function f:onUpdate(sinceLastUpdate)
self.sinceLastUpdate = (self.sinceLastUpdate or 0) + sinceLastUpdate;
if ( self.sinceLastUpdate >= 0 ) then
if enabledm == true then
if stopcast == true then
local spell, _, _, _, _, endTime = UnitCastingInfo("player");
local kickme = (endTime/1000 - GetTime());
if spell == "Hardened Shell" and kickme < 0.20 then
SpellStopCasting()
stopcast = false
end
else
for i=1,40 do
local B=UnitBuff("target",i);
if (B == "Sea Turtle" or B == "Swift Springstrider") then
DismountBG()
end
end
end
end
self.sinceLastUpdate = 0;
end
end
f:SetScript("OnUpdate",f.onUpdate)
As you can see, i'm not that good with Lua,
but it wold be nice to get some advice/help with this.
Edit: Added AddOn to thread
Last edited by MrNoble; 05-18-2017 at 09:46 AM.
Reason: fixed video