Originally Posted by
qzt
Firepong just tryed the last PHP you posted and it still use both....i just copy and paste it, might the if mfCD < 1 then be on the wrong position?
try
PHP Code:
if xelperInterruptInit == nil then
--TestComment
xelperInterruptInit = true
function PQR_InterruptSpell()
local _, playerClass = UnitClass("player")
if playerClass == "DEATHKNIGHT" then
local mfStart, mfDuration = GetSpellCooldown(47528)
local sStart, sDuration = GetSpellCooldown(47476)
if ( GetSpellCooldown(47528) == 0 and GetSpellCooldown(47476) == 0 ) then --If both arent on CD then choose mind freeze
return 47528
elseif ( sStart > 0 and sDuration > 1.5 ) then --if Strangulate is on CD then choose mind freeze
return 47528
elseif ( mfStart > 0 and mfDuration > 1.5 ) then -- if mindfreeze is on cd then choose strangulate
return 47476
end
elseif playerClass == "DRUID" then
local catForm = UnitBuffID("player", 768)
if catForm ~= nil then
return 80965
else
return 80964
end
elseif playerClass == "HUNTER" then
return 34490
elseif playerClass == "MAGE" then
return 2139
elseif playerClass == "PALADIN" then
return 96231
elseif playerClass == "PRIEST" then
return 15487
elseif playerClass == "ROGUE" then
return 1766
elseif playerClass == "SHAMAN" then
return 57994
elseif playerClass == "WARLOCK" then
return 19647
elseif playerClass == "WARRIOR" then
return 6552
else
return 0
end
end
end