Here is a Feral Druid profile, this is based on AdamZZ's and Googlebee's, it is a bit messy as I am new to LUA.
Added Combat and Shape-shift checks so one profile can work for both cat and bear and allow quick switching. You can now disable "Require combat for Auto Mode".
While in caster form it will cast heals on yourself if needed and Mark of the Wild. If you hold left shift it will off heal, though healing efficiency would be questionable.
Additions to come is a spell book check to see if you have the abilitys to allow for leveling, focus target Cyclone and mouseover rebirth.
Code:
<?xml version="1.0" encoding="utf-8" ?><DRUID><Ability><Name>Cat - Tigers Fury</Name><Default>false</Default><SpellID>5217</SpellID><Actions>/use Ancient Petrified Seed</Actions><Lua>local _,_,_,TF = UnitBuffID("player", 5217)
local TFstart, TFduration = GetSpellCooldown(5217)
local TFcooldown = (TFstart + TFduration - GetTime())
local tfEnergy = UnitPower("player") / UnitPowerMax("player") * 100
if GetShapeshiftForm()==3 and TF ~= nil then
return false
else
if TFcooldown > 0 then
return false
else
if tfEnergy < 40 then
return true
end
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Cat - Ferocious Bite</Name><Default>false</Default><SpellID>22568</SpellID><Actions></Actions><Lua>local fbrip, _, _, _, _, _, fbtimer = UnitDebuffID("target", 1079, "PLAYER")
local fbCP = GetComboPoints("player", "target")
local fbhealth = 100 * UnitHealth("target") / UnitHealthMax("target")
local fbenergy = UnitPower("player") / UnitPowerMax("player") * 100
if GetShapeshiftForm()==3 and fbhealth <= 25 then
if fbrip ~= nil then
if fbCP == 5 then
return true
end
end
else
if GetShapeshiftForm()==3 and fbrip ~= nil then
if fbtimer - GetTime() > 5 and fbenergy >= 60 and fbCP == 5 then
return true
end
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Cat - Savage Roar</Name><Default>false</Default><SpellID>52610</SpellID><Actions></Actions><Lua>local _,_,_,SavageRoar = UnitBuffID("player", 62071)
local srCP = GetComboPoints("player", "target")
local rip, _, _, _, _, _, riptimer = UnitDebuffID("target", 1079, "PLAYER")
if GetShapeshiftForm()==3 and SavageRoar ~= nil then
return false
else
if rip ~= nil then
if srCP >= 1 then
if riptimer - GetTime() >= 8 then
return true
end
end
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Cat - Faerie Fire</Name><Default>false</Default><SpellID>16857</SpellID><Actions></Actions><Lua>if GetShapeshiftForm()==3 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Bear - Faerie Fire</Name><Default>false</Default><SpellID>16857</SpellID><Actions></Actions><Lua>if GetShapeshiftForm()==1 then
return true
end</Lua><RecastDelay>1</RecastDelay><Target>Target</Target></Ability><Ability><Name>Cat - Rip</Name><Default>false</Default><SpellID>1079</SpellID><Actions>/use Ancient Petrified Seed</Actions><Lua>local rip, _, _, _, _, _, riptimer = UnitDebuffID("target", 1079, "PLAYER")
local ripCP = GetComboPoints("player", "target")
local riphealth = 100 * UnitHealth("target") / UnitHealthMax("target")
if GetShapeshiftForm()==3 and rip ~= nil then
if riphealth > 25 then
if ripCP == 5 then
if riptimer - GetTime() < 2 then
return true
end
end
end
else
if ripCP == 5 then
return true
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Bear - Mangle</Name><Default>false</Default><SpellID>33878</SpellID><Actions>/startattack</Actions><Lua>if GetShapeshiftForm()==1 then
return true
end</Lua><RecastDelay>1</RecastDelay><Target>Target</Target></Ability><Ability><Name>Berserk</Name><Default>false</Default><SpellID>50334</SpellID><Actions>/use Berserking</Actions><Lua>if GetShapeshiftForm()~=0 and IsLeftShiftKeyDown() then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Cat - Swipe</Name><Default>false</Default><SpellID>62078</SpellID><Actions></Actions><Lua>local _,_,_,BS = UnitBuffID("player", 50334)
local energy = UnitPower("player") / UnitPowerMax("player") * 100
if GetShapeshiftForm()==3 and BS ~= nil and CheckInteractDistance("target", 3) ~= nil then
if energy >= 22 and CheckInteractDistance("target", 3) ~= nil then
return true
end
else
if energy >= 45 and CheckInteractDistance("target", 3) ~= nil then
return true
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Cat - Shred</Name><Default>false</Default><SpellID>5221</SpellID><Actions>/startattack</Actions><Lua>-- Check for the debuffs.
local hasCatMangle = UnitDebuffID("target", 33876)
local hasBearMangle = UnitDebuffID("target", 33878)
local hasTrauma = UnitDebuffID("target", 46857)
local hasHemorrhage = UnitDebuffID("target", 16511)
local CP = GetComboPoints("player", "target")
-- Just check for all buffs, we have no casting time on Shred so no need for a timer check
if GetShapeshiftForm()==3 and hasCatMangle ~= nil or hasBearMangle ~= nil or hasTrauma ~= nil or hasHemorrhage ~= nil then
if PQR_NotBehindTarget() then
return false
else
if CP == 5 then
return false
else
return true
end
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Bear - Swipe</Name><Default>false</Default><SpellID>779</SpellID><Actions>/startattack</Actions><Lua>if GetShapeshiftForm()==1 and CheckInteractDistance("target", 3) == nil or UnitCanAttack("player", "target") == nil then
return false
end
if GetShapeshiftForm()==1 then
return true
end</Lua><RecastDelay>1</RecastDelay><Target>Target</Target></Ability><Ability><Name>Bear - Maul</Name><Default>false</Default><SpellID>6807</SpellID><Actions></Actions><Lua>if GetShapeshiftForm()==1 then
return true
end</Lua><RecastDelay>1</RecastDelay><Target>Target</Target></Ability><Ability><Name>Bear - Enrage</Name><Default>false</Default><SpellID>5229</SpellID><Actions>/use Ancient Petrified Seed</Actions><Lua>local _,_,_,ER = UnitBuffID("player", 5229)
local ERstart, ERduration = GetSpellCooldown(5229)
local ERcooldown = (ERstart + ERduration - GetTime())
local erEnergy = UnitPower("player") / UnitPowerMax("player") * 100
if GetShapeshiftForm()==1 and ER ~= nil then
return false
else
if GetShapeshiftForm()==1 and ERcooldown > 0 then
return false
else
if GetShapeshiftForm()==1 and erEnergy < 75 then
return true
end
end
end</Lua><RecastDelay>0</RecastDelay><Target>Player</Target></Ability><Ability><Name>Bear - Lacerate</Name><Default>false</Default><SpellID>33745</SpellID><Actions></Actions><Lua>if GetShapeshiftForm()==1 then
return true
end</Lua><RecastDelay>1</RecastDelay><Target>Target</Target></Ability><Ability><Name>Bear - Pulverize</Name><Default>false</Default><SpellID>80313</SpellID><Actions>/use Enrage|/use Ancient Petrified Seed|/use Berserk|/use Berserking</Actions><Lua>local _, _, _, LacerateCount = UnitDebuff("target", "Lacerate")
if GetShapeshiftForm()==1 and LacerateCount ~= nil then
if LacerateCount == 3 then
return true
end
else
return false;
end</Lua><RecastDelay>1</RecastDelay><Target>Target</Target></Ability><Ability><Name>Bear - Thrash</Name><Default>false</Default><SpellID>77758</SpellID><Actions>/startattack|/use Enrage</Actions><Lua>if GetShapeshiftForm()==1 then
return true
end</Lua><RecastDelay>1</RecastDelay><Target>Target</Target></Ability><Ability><Name>Bear - Demoraling Roar</Name><Default>false</Default><SpellID>99</SpellID><Actions></Actions><Lua>local vindication = UnitDebuffID("target", 26017)
local demoshout = UnitDebuffID("target", 1160)
local curseofweakness = UnitDebuffID("target", 702)
local demoroar = UnitDebuffID("target", 99)
if GetShapeshiftForm()==1 and CheckInteractDistance("target", 3) == nil or UnitCanAttack("player", "target") == nil then
return false
end
if GetShapeshiftForm()==1 and vindication == nil and demoshout == nil and curseofweakness == nil and demoroar == nil then
local targetName = UnitName("target")
if targetName ~= nil then
return true
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Cat - Mangle</Name><Default>false</Default><SpellID>33876</SpellID><Actions>/startattack</Actions><Lua>-- Rogues and Warriors can handle it themselves.
local hasCatMangle, _, _, _, _, _, CatMangleTimer = UnitDebuffID("target", 33876)
local hasBearMangle, _, _, _, _, _, BearMangleTimer = UnitDebuffID("target", 33878, "PLAYER")
local hasTrauma = UnitDebuffID("target", 46857)
local hasHemorrhage = UnitDebuffID("target", 16511)
local CP = GetComboPoints("player", "target")
if GetShapeshiftForm()==3 and PQR_NotBehindTarget() then
if CP == 5 then
return false
else
return true
end
end
-- First, let's let other people handle their own debuffs
if hasTrauma ~= nil then
return false
elseif hasHemorrhage ~= nil then
return false
elseif hasBearMangle ~= nil then
return false
-- Let us handle it!
elseif hasCatMangle ~= nil or hasBearMangle ~= nil and GetShapeshiftForm()==3 then
-- Check the timer
if CatMangleTimer - GetTime() < 1 then
return true
end
else
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Bear - Feral Charge</Name><Default>false</Default><SpellID>16979</SpellID><Actions></Actions><Lua>if GetShapeshiftForm()==1 and IsLeftControlKeyDown() then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Cat - Feral Charge</Name><Default>false</Default><SpellID>49376</SpellID><Actions></Actions><Lua>if IsLeftControlKeyDown() then
if GetShapeshiftForm()==3 then
return true
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Cat - Rake</Name><Default>false</Default><SpellID>1822</SpellID><Actions>/startattack</Actions><Lua>local rake, _, _, _, _, _, raketimer = UnitDebuffID("target", 1822, "PLAYER")
if GetShapeshiftForm()==3 and rake ~= nil then
if raketimer - GetTime() < 3 then
return true
end
else
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Mark of the Wild</Name><Default>false</Default><SpellID>1126</SpellID><Actions></Actions><Lua>if UnitCanCooperate("player","target") and UnitIsDead("target") == nil and UnitBuffID("target", 79061) == nil and UnitAffectingCombat("target") == nil then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Cat Form</Name><Default>false</Default><SpellID>768</SpellID><Actions></Actions><Lua>if GetShapeshiftForm()~=3 and IsRightControlKeyDown() then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Bear Form</Name><Default>false</Default><SpellID>5487</SpellID><Actions></Actions><Lua>if GetShapeshiftForm()~=1 and IsRightShiftKeyDown() then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>--- offensive spells ---</Name><Default>false</Default><SpellID>0</SpellID><Actions></Actions><Lua>local buff = { 642, 45438, 31224, 23920, 33786, 19263, 97417, 97977 }
local mob = { "Training Dummy", "Raider's Training Dummy", "Twisted Spirit", "Amani´shi Hatcher", "Hakkar's Chains" }
local noaggromobs = nil
local immunity = nil
for i,v in ipairs(buff) do
if UnitBuffID("target",v) then immunity = 1 end
end
for i,v in ipairs(mob) do
if UnitName("target") == v then noaggromobs = 1 end
end
if UnitIsDead("target")
or SpellIsTargeting()
or immunity
or UnitCanAttack("player","target") == nil
or (UnitAffectingCombat("target") == nil and noaggromobs == nil)
then return true end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Caster Form</Name><Default>false</Default><SpellID>0</SpellID><Actions></Actions><Lua>if GetShapeshiftForm()~=0 and IsRightAltKeyDown() then
CancelShapeshiftForm()
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Caster - Barkskin</Name><Default>false</Default><SpellID>22812</SpellID><Actions></Actions><Lua>local unithealth = 100 * UnitHealth("target") / UnitHealthMax("target")
if GetShapeshiftForm()==0 and enraged == nil and unithealth <= 50 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Caster - Innervate</Name><Default>false</Default><SpellID>29166</SpellID><Actions></Actions><Lua>local manapercent = 100 * UnitPower("player") / UnitPowerMax("player")
if GetShapeshiftForm()==0 and manapercent < 50 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Caster - Auto Target</Name><Default>false</Default><SpellID>0</SpellID><Actions></Actions><Lua>local mytarget = "player"
local lowest = 100 * UnitHealth(mytarget) / UnitHealthMax(mytarget)
local self = 100 * UnitHealth(mytarget) / UnitHealthMax(mytarget)
local group = "party"
local members = GetNumPartyMembers()
lowhpmembers = 0
if GetNumRaidMembers() > 0 then
group = "raid"
members = GetNumRaidMembers()
end
for i = 1, members, 1 do
local member = group..tostring(i)
local memberhp = 100 * UnitHealth(member) / UnitHealthMax(member)
if UnitGroupRolesAssigned(member) == "TANK" then memberhp = memberhp - 5 end
if UnitThreatSituation(member) == 3 then memberhp = memberhp - 5 end
if memberhp < 95 and UnitInRange(member) then lowhpmembers = lowhpmembers +1 end
if memberhp > 1 and memberhp < lowest and UnitInRange(member) then
mytarget = member
lowest = memberhp
end
end
if GetShapeshiftForm()==0 and IsLeftShiftKeyDown() then
TargetUnit(mytarget)
elseif GetShapeshiftForm()==0 and self < 75 then
TargetUnit("player")
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Caster - Healing Touch</Name><Default>false</Default><SpellID>5185</SpellID><Actions></Actions><Lua>local friend = UnitIsFriend("player","target")
local mytarget = 100 * UnitHealth("target") / UnitHealthMax("target")
local manapercent = 100 * UnitPower("player") / UnitPowerMax("player")
if GetShapeshiftForm()==0 and friend ~= nil and mytarget < 40 and manapercent > 10 then
return true
end
if GetShapeshiftForm()==0 and friend ~= nil and PQR_IsMoving(1) == false and mytarget < 40 and manapercent > 10 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Caster - Rejuvenation</Name><Default>false</Default><SpellID>774</SpellID><Actions></Actions><Lua>local friend = UnitIsFriend("player","target")
local mytarget = 100 * UnitHealth("target") / UnitHealthMax("target")
local rejuvenation = UnitBuffID("target", 774)
if GetShapeshiftForm()==0 and friend ~= nil and mytarget < 90 and rejuvenation == nil and IsMounted() == nil then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Caster - Regrowth</Name><Default>false</Default><SpellID>8936</SpellID><Actions></Actions><Lua>local friend = UnitIsFriend("player","target")
local mytarget = 100 * UnitHealth("target") / UnitHealthMax("target")
local manapercent = 100 * UnitPower("player") / UnitPowerMax("player")
local regrowth = UnitBuffID("target", 8936)
if GetShapeshiftForm()==0 and friend ~= nil and mytarget < 50 and manapercent > 15 and IsMounted() == nil and regrowth == nil then
return true
end
if GetShapeshiftForm()==0 and friend ~= nil and PQR_IsMoving(1) == false and mytarget < 35 and manapercent > 30 and IsMounted() == nil and regrowth == nil then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Caster - Nourish</Name><Default>false</Default><SpellID>50464</SpellID><Actions></Actions><Lua>local friend = UnitIsFriend("player","target")
local mytarget = 100 * UnitHealth("target") / UnitHealthMax("target")
local regrowth = UnitBuffID("target", 8936)
if GetShapeshiftForm()==0 and friend ~= nil and mytarget < 50 and regrowth ~= nil then
return true
end
if GetShapeshiftForm()==0 and friend ~= nil and PQR_IsMoving(1) == false and mytarget < 70 and regrowth ~= nil then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Caster - Life Bloom</Name><Default>false</Default><SpellID>33763</SpellID><Actions></Actions><Lua>local friend = UnitIsFriend("player","target")
local mytarget = 100 * UnitHealth("target") / UnitHealthMax("target")
local _,_,_,LB,_,_,LBt = UnitBuffID("target", 33763)
if GetShapeshiftForm()==0 and friend ~= nil and mytarget < 90 and LB == nil then
return true
elseif GetShapeshiftForm()==0 and friend ~= nil and mytarget < 90 and LB < 3 then
return true
elseif GetShapeshiftForm()==0 and friend ~= nil and LB ~= nil and LBt - GetTime() < 1 and mytarget < 96 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability></DRUID>