The other day; I discovered macros. Now I'm trying to create a macro that would cast the first usable action in this order; Shield Block, Revenge, Victory Rush, Shield Slam, Devastate.
Perhaps if blizzard properly documented their own API's and languages I would've discovered this isn't supposed to be do-able -- but having spent time on it I'd like to finish what I started.
Thoughts?
Perhaps if blizzard properly documented their own API's and languages I would've discovered this isn't supposed to be do-able -- but having spent time on it I'd like to finish what I started.
Code:
-- blocked
/script local a,b,_; for a=26,30 do DEFAULT_CHAT_FRAME:AddMessage(a) b,_ = IsUsableAction(a) if IsUsableAction(a) then UseAction(a) end end
-- no debug
/script local a; for a=26,32 do if IsUsableAction(a) then UseAction(a) break; end end
-- workaround?
/script (function() for a=26,30 do if IsUsableAction(a) then UseAction(a) end end)()
-- stupid version
/script local a; for a=26,30 do UseAction(a) end
-- really stupid version
/script UseAction(26) UseAction(27) UseAction(28) UseAction(29) UseAction(30)
-- moar workaround
/dump loadstring(" local a; for a=26,32 do if IsUsableAction(a) then UseAction(a) break; end end")()