So yeah, I decided to have a go at making rotations, all those pro people are doing it! how hard can it be?
So I got it using crusader strike, so far so good.
Got it to check if Divine Purpose had proc'd and not use crusader strike if so. sweet.
Tried to make it check if I was in range to use the ability, F A I L.
Much tweaking and tinkering doesn't seem to cure it.
Lua File:
PHP Code:
function CheckPurpose()
if UnitBuffID("player", 90174)
then return true
end
end
function CheckMelee()
if IsSpellInRange(GetSpellInfo(35395),"target") == 0
then return true
end
end
Ability:
PHP Code:
if CheckPurpose() then return false end
if CheckMelee() then return false end
if UnitPower("player", 9) < 5
then
CastSpellByName(GetSpellInfo(35395), "target")
end
WoW wigs out at it and says...
PHP Code:
Message: [string "if CheckPurpose() then return false end ..."]:3: attempt to call global 'CheckMelee' (a nil value)
Time: 10/24/12 08:38:26
Count: 421
Stack: [C]: in function `CheckMelee'
[string "if CheckPurpose() then return false end ..."]:3: in function `?'
[string "if PQR_Addon_Loaded == nil then..."]:737: in function `PQR_NextAbility'
[string "if PQR_Addon_Loaded == nil then..."]:533: in function `PQR_ExecuteRotation'
[string "if PQR_Addon_Loaded == nil then..."]:289: in function <[string "if PQR_Addon_Loaded == nil then..."]:214>
Dunno if this is posted in the right place, didn't notice a 'Halp i suck at learning' forum area.