Finally fixed it. Working double jeopardy code, or multi-dotting.
PHP Code:
local cStack = select(4, UnitDebuffID("focus", 31803))
local cTime = select(7, UnitDebuffID("focus", 31803))
local censure = UnitDebuffID("focus", 31803)
if GetShapeshiftForm() ~= 0 then hasSeal = true else hasSeal = false end
if hasSeal then
if UnitPower("player", 9) < 5 then
if UnitExists("focus") == nil or (UnitExists("focus") and cStack == 5 and ((cTime - GetTime()) > 7)) then
CastSpellByName(GetSpellInfo(20271), "target")
elseif UnitExists("focus") then
if censure == nil or cStack < 5 or ((cTime - GetTime()) <= 7) then
CastSpellByName(GetSpellInfo(20271), "focus")
return true
end
end
end
end