Quantcast
WoWInterface - View Single Post - Target macro for raid
View Single Post
10-07-20, 05:01 PM   #4
seanjohn24
A Defias Bandit
Join Date: Oct 2020
Posts: 2
Originally Posted by SDPhantom View Post
I whipped up a macro using a different approach. It scans through the marker indices for an unused one, starting with skull downward. I also put in a safety feature to ignore units with a marker already set.
Code:
local u="mouseover";if UnitExists(u) and not GetRaidTargetIndex(u) then for i=8,1,-1 do if not IsRaidMarkerActive(i) then SetRaidTarget(u,i);break;end end end
Note: This doesn't work in classic because IsRaidMarkerActive() doesn't exist in that build.
Your macro doesn't properly rotate between targets. It marks skull everytime.

Adding swapping to mouseover worked perfectly for my macro. Thanks

As an experienced programmer, I'm just getting into LUA and WoW addons/scripts, any advice or guides that show the builtin functions, IE IsRaidMarkerActive()... as i cannot find an exhaustive list anywhere.
  Reply With Quote