Hello everyone. First of all, thanks for this wonderful site and all of the profiles!
I've been using Cpoworks enhancement profile for quite some time now, good dps and good customization.
he does appear to be MIA at the time though. Made a request on his thread, but no answer so far.
Been trying to alter his Flame Shock coding, without luck, since my coding skills are minimal.
This is what I'm trying to achieve:
Apply Flame Shock if:
it is not applied on your target and Unleash Flame is up (buff granted by using Unleash Elements);
it is applied on your target and Unleash Flame is up;
it is not applied on your target, but Unleash Flame is not up and Unleash Elements will not come off cooldown in the next 5 seconds.
got 2 abilities right now:
Flame shock:
Code:
local Flameshock = select(7,UnitDebuffID("target",8050,"PLAYER"))
if not AoE then
if cdRemains(73680) < 5 then --Unleash elements
return false
end
if not Flameshock then
_castSpell(8050, "Target")
end
else
if cdRemains(73680) < 5 then --Unleash elements
return false
end
if not Flameshock then
_castSpell(8050, "Target")
end
end
and Flame Shock (UE)
Code:
local Flameshock = select(7,UnitDebuffID("target",8050,"PLAYER"))
local UF = select(7,UnitBuffID ("player",73683))
if not AoE then
if Flameshock - GetTime() < 7
and UF then
_castSpell(8050, "Target")
end
else
if Flameshock - GetTime() < 13
and UF then
_castSpell(8050, "Target")
end
end
When I initiate combat I get a Lua error
Code:
Date: 2013-10-30 02:16:58
ID: 2
Error occured in: Global
Count: 43
Message: [string "local Flameshock = select(7,UnitDebuffID("t..."] line 9:
attempt to perform arithmetic on local 'Flameshock' (a nil value)
Debug:
[C]: ?
[string "local Flameshock = select(7,UnitDebuffID("t..."]:9: ?()
[string "if PQR_Addon_Loaded == nil then..."]:765: PQR_NextAbility()
[string "if PQR_Addon_Loaded == nil then..."]:534: PQR_ExecuteRotation()
[string "if PQR_Addon_Loaded == nil then..."]:287:
[string "if PQR_Addon_Loaded == nil then..."]:214
Can anybody tell me what i should change to make this work?