Leynd, Try this.
PHP Code:
local DPCD = select(2,GetSpellCooldown(498))
local GuardianCD = select(2,GetSpellCooldown(86669))
local PlayerHP = UnitHealth("player") / UnitHealthMax("player") * 100
-- Divne Protection
if PlayerHP <= 100
and PQR_SpellAvailable(498) then
CastSpellByName(GetSpellInfo(498))
end
-- Guardian of Ancient King
if PlayerHP <= 100
and PQR_SpellAvailable(86669)
and DPCD > 3
and UnitBuffID("player", 498) == nil then
CastSpellByName(GetSpellInfo(86669))
end
-- Trinket 1
if PlayerHP <= 100
and GetInventoryItemCooldown("player",13) == 0
and DPCD > 3
and UnitBuffID( "player", 498) == nil then
UseInventoryItem(13)
end
if you want it to use the trinket when guardian or DP is not up then you could just do
PHP Code:
if PlayerHP <= 100
and GetInventoryItemCooldown("player",13) == 0
and UnitBuffID("player", 86669) == nil
and UnitBuffID("player", 498) == nil then
UseInventoryItem(13)
end