Here comes my code getting the ignite damage and if fireball critted:
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
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
--print("Mage Functions FireBall CRITTED. " ..Fireballdamage)
end
end
end
end
end
end
end
Code:
if modkeytime == nil then modkeytime = 0 end
if IsRightControlKeyDown() and GetTime() - modkeytime > 1 then
modkeytime = GetTime()
if modkeystate then
modkeystate = nil
print("Rotation mode: \124cFFDBFA2ASMANA")
else
modkeystate = 1
print("Rotation mode: \124cFFFA652ABURN")
end
end
then you can check in Pyroblast if fireball Critted like this:
Code:
local start, duration, enabled = GetSpellCooldown(11129);
if not UnitChannelInfo("player") and FireballCrit == 1 then
if duration > 8
or duration < 1 then
CastSpellByName(tostring(GetSpellInfo(92315)))
--print("Mage Functions FireBall CRITTED. " ..Fireballdamage)
return true
end
end
And you can check combustion to be cast if you have a ignitedame thats higher then a certain number so we dont waste a combustion on 7K ignites.
Code:
local LB, _, _, _, _, _, LBtimer = UnitDebuffID("target", 44457, "player")
local IGNITE, _, _, _, _, _, IGNITEtimer = UnitDebuffID("target", 12654, "player")
if UnitHealth("target") > UnitHealthMax("player")*Pressure("target")
and IgniteLastDamage > 15000
and modkeystate
and UnitDebuffID("target", 92315,"PLAYER")
and UnitDebuffID("target", 44457,"PLAYER")
then
if IGNITE then
if IGNITEtimer - GetTime() >= 1 then
return true end
end
end
if UnitHealth("target") > UnitHealthMax("player")*Pressure("target")
and IgniteLastDamage > 25000
and modkeystate
then return true end
I think the code can be better but its something to start. I have some code that can be changed etc.
And remember to get this code working you need to set fireballcritt = 0 at top somewhere in rotation
My code is based on Xelper and sheuron from start