Ok, I finally got my Resto Druid rotation working. Press Shift to use tranquility.
Code:
<?xml version="1.0" encoding="utf-8" ?><DRUID><Ability><Name>Rake</Name><Default>false</Default><SpellID>1822</SpellID><Actions></Actions><Lua>local rake, _, _, _, _, _, raketimer = UnitDebuffID("target", 1822, "PLAYER")
if 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>Rip</Name><Default>false</Default><SpellID>1079</SpellID><Actions></Actions><Lua>local rip, _, _, _, _, _, riptimer = UnitDebuffID("target", 1079, "PLAYER")
local ripCP = GetComboPoints("player", "target")
local riphealth = 100 * UnitHealth("target") / UnitHealthMax("target")
if 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>Shred</Name><Default>false</Default><SpellID>5221</SpellID><Actions></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 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>Mangle</Name><Default>false</Default><SpellID>33876</SpellID><Actions></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 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 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>Faerie Fire (Feral)</Name><Default>false</Default><SpellID>16857</SpellID><Actions></Actions><Lua>local FF, _, _, _, _, _, timer = UnitDebuffID("target", 91565)
local FFstart, FFduration, FFenabled = GetSpellCooldown(16857)
local FFcooldown = (FFstart + FFduration - GetTime())
if FF == nil then
if FFcooldown > 0 then
return false
else
return true
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>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 SavageRoar ~= nil then
return false
else
if rip ~= nil then
if srCP >= 5 then
if riptimer - GetTime() >= 8 then
return true
end
end
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>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 fbhealth <= 25 then
if fbrip ~= nil then
if fbCP == 5 then
return true
end
end
else
if 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>Berserk</Name><Default>false</Default><SpellID>50334</SpellID><Actions></Actions><Lua>local _, _, _, BS = UnitBuffID("player", 50334)
local BSstart, BSduration = GetSpellCooldown(50334)
local BScooldown = (BSstart + BSduration - GetTime())
local bsEnergy = UnitPower("player") / UnitPowerMax("player") * 100
local bsHealth = UnitHealth("target") / UnitHealthMax("target") * 100
local levelcheck = UnitLevel("target")
if levelcheck == -1 or levelcheck >= 87 then
if BScooldown > 0 then
return false
else
-- if bsHealth < 96 then
return true
-- end
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>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 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>Swipe</Name><Default>false</Default><SpellID>62078</SpellID><Actions></Actions><Lua>local _,_,_,BS = UnitBuffID("player", 50334)
local energy = UnitPower("player") / UnitPowerMax("player") * 100
if BS ~= nil then
if energy >= 22 then
return true
end
else
if energy >= 45 then
return true
end
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>cat form</Name><Default>false</Default><SpellID>768</SpellID><Actions></Actions><Lua>local slowed = UnitDebuff("player", "120")
local slowed = UnitDebuff("player", "7302")
local slowed = UnitDebuff("player", "5116")
local slowed = UnitDebuff("player", "8056")
local slowed = UnitDebuff("player", "45524")
if slowed ~= nil then
CastSpellByName("Cat Form", "768")
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>barkskin</Name><Default>false</Default><SpellID>22812</SpellID><Actions></Actions><Lua>local unithealth = 100 * UnitHealth("target") / UnitHealthMax("target")
if enraged == nil and unithealth <= 60 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>s</Name><Default>false</Default><SpellID>0</SpellID><Actions></Actions><Lua>local mytarget = "player"
local lowest = 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
TargetUnit(mytarget)</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: Autotarget LowHP</Name><Default>false</Default><SpellID>0</SpellID><Actions></Actions><Lua>local mytarget = "player"
local lowest = 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
TargetUnit(mytarget)</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: Nourish</Name><Default>false</Default><SpellID>50464</SpellID><Actions></Actions><Lua>local friend = UnitIsFriend("player","target")
local mytarget = 100 * UnitHealth("target") / UnitHealthMax("target")
if friend ~= nil and mytarget < 90 then
return true
end
if friend ~= nil and PQR_IsMoving(1) == false and mytarget < 90 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: 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 friend ~= nil and mytarget < 95 and rejuvenation == nil and IsMounted() == nil then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: Wild Growth</Name><Default>false</Default><SpellID>48438</SpellID><Actions></Actions><Lua>local friend = UnitIsFriend("player","target")
local mytarget = 100 * UnitHealth("target") / UnitHealthMax("target")
if friend ~= nil and mytarget < 80 and lowhpmembers >= 5 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: Swiftmend</Name><Default>false</Default><SpellID>18562</SpellID><Actions></Actions><Lua>local friend = UnitIsFriend("player","target")
local mytarget = 100 * UnitHealth("target") / UnitHealthMax("target")
local SM = UnitBuffID("target",774)
if friend ~= nil and SM ~= nil and mytarget < 85 and lowhpmembers >= 3 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: 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 Clearcasting = UnitBuffID("player",16870, "player")
if friend ~= nil and Clearcasting ~= nil and mytarget < 65 and manapercent > 15 and IsMounted() == nil then
return true
end
if friend ~= nil and PQR_IsMoving(1) == false and mytarget < 35 and manapercent > 15 and IsMounted() == nil then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: Innervate</Name><Default>false</Default><SpellID>29166</SpellID><Actions></Actions><Lua>local manapercent = 100 * UnitPower("player") / UnitPowerMax("player")
if manapercent < 65 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: Lifebloom</Name><Default>false</Default><SpellID>33763</SpellID><Actions></Actions><Lua>local friend = UnitIsFriend("player","target")
local mytarget = 100 * UnitHealth("target") / UnitHealthMax("target")
local LB = UnitBuffID("target", 33763)
local treeoflife = UnitBuffID("player",33891)
if friend ~= nil and mytarget < 96 and LB <=3 and UnitThreatSituation("target") then
return true
end
if friend ~= nil and treeoflife~= nil and mytarget < 85 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: 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")
local SwG = UnitBuffID("player", 17116)
if friend ~= nil and SwG ~= nil and mytarget < 25 and manapercent > 10 then
return true
end
if friend ~= nil and PQR_IsMoving(1) == false and mytarget < 25 and manapercent > 10 then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Resto: Tranquility</Name><Default>false</Default><SpellID>740</SpellID><Actions></Actions><Lua>local SwG = UnitBuffID("player", 17116)
if SwG ~= nil and GetSpellCooldown(740) == 0 and IsShiftKeyDown() then
return true
end
if PQR_IsMoving(1) == false and GetSpellCooldown(740) == 0 and IsShiftKeyDown() and IsMounted() == nil then
return true
end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability></DRUID>