Hi.
Your code doesn't work: -
condiok = 0;
local playerhealth = 100 * UnitHealth("player") / UnitHealthMax("player")
local targethealth = 100 * UnitHealth("target") / UnitHealthMax("target")
local threat = UnitDetailedThreatSituation("player", "target")
local start, duration, enabled = GetSpellCooldown(2565)
if (start + duration - GetTime() > 0 and UnitPower("player") >= 85) or UnitBuff
("player",GetSpellInfo(122510)) or UnitBuff("player",GetSpellInfo(122016)) then
condiok = 1;
end
but I decided to play around with it and can get it to work: -
condiok = 0;
local playerhealth = 100 * UnitHealth("player") / UnitHealthMax("player")
local targethealth = 100 * UnitHealth("target") / UnitHealthMax("target")
local threat = UnitDetailedThreatSituation("player", "target")
local start, duration, enabled = GetSpellCooldown(2565)
if UnitPower("player") >= 85) or UnitBuffID("player",122510)
then
condiok = 1;
end
The only difference is I took out 'if (start + duration - GetTime() >0' and then deleted the ')' after the UnitPower check since that closed bracket wasn't needed any more. I also removed the Incite check because I didn't want that in.
It works like this, been watching it carefully.
Out of curiosity though, why doesn't the Shield Block part of your 'HSProt.xml' work, any idea?
These parts: 'local start, duration, enabled = GetSpellCooldown(2565) if (start + duration - GetTime() > 0'