i have made one similiar but what i do is check the ignite damage and if its above a certain number i will cast combustion. You dont need to check for pyroblast pn target cause ignite wont be high if its not based on a pyroblast afaik
My code is working atm if you cast first fireballs until there is a ignite on target but you cane asily code that in if you want. I dont bother atm cause i dont get rep !!!
btw you need to make 2 abilities named
Event loader and event functions
Event loader:
Code:
if XelperDruidEvents == nil then
XelperDruidEvents = true
print("Mage Events Loaded.")
local xelperFrame = CreateFrame("Frame")
xelperFrame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
xelperFrame:SetScript("OnEvent", xelperFrame_OnEvent)
xelperFrame:Show()
end
Event functions
Code:
if MageFunctions == nil then
MageFunctions = true
print("Mage Functions Loadeds.")
function xelperFrame_OnEvent(self,event,...)
if event == "COMBAT_LOG_EVENT_UNFILTERED" then
--print("Mage Functions Combatlog.")
local subEvent = select(2, ...)
local sourceName = select(5, ...)
local destName = select(9, ...)
local spellName = select(13, ...)
local spellAmount = select(15, ...)
local spellCrit = select(21, ...)
if subEvent == "SPELL_PERIODIC_DAMAGE" then
-- print("Mage Functions Periodic.")
if UnitName("player") == sourceName and destName == UnitName("target") then
if spellName == GetSpellInfo(12654) then
IgniteLastDamage = spellAmount
print("Mage Functions Ignite. " ..IgniteLastDamage)
end
end
end
if subEvent == "SPELL_AURA_REMOVED" then
-- print("Mage Functions Aura Removed.")
if UnitName("player") == sourceName then
if spellName == GetSpellInfo(12654) then
IgniteLastDamage = 0
-- print("Mage Functions resetting ignite. ")
end
end
end
if subEvent == "SPELL_DAMAGE" then
-- print("Mage Functions Damage.")
if UnitName("player") == sourceName and destName == UnitName("target") then
if spellName == GetSpellInfo(133) then
Fireballdamage = spellAmount
if spellCrit == 1 then
FireballCrit = 1
else
FireballCrit = 0
-- print("Mage Functions FireBall CRITTED. " ..Fireballdamage)
end
end
end
end
end
end
end
Combustion: you need to make a macro named combustion or change the code
Code:
if IgniteLastDamage > 9000 --Change this to suit your gear
--and UnitDebuffID("target", 92315,"player") -- this isnt working atm in mop change this to check for pyroblast dot
then RunMacro("Combustion") return true end
Any questions about this check my signature for the right forum.
BTW my Fire mage script isnt on dropbox atm but im around 43K DPS with HC gear