WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Macro Help (https://www.wowinterface.com/forums/forumdisplay.php?f=140)
-   -   Target macro for raid (https://www.wowinterface.com/forums/showthread.php?t=58250)

alivelele 10-03-20 03:52 PM

Target macro for raid
 
Heya,

just wanted to ask if there is a way to mark 2 Adds with the exact same Name...

First target with skull , cycle to next target with same name and then mark it with the X?

seanjohn24 10-06-20 12:09 AM

I create a global variable, GlobalMarker (/run GlobalMarker = 8) each session... then run this in a macro...

/run if GlobalMarker > 0 then SetRaidTarget("target",GlobalMarker) GlobalMarker = GlobalMarker - 1 else GlobalMarker = 8 SetRaidTarget("target",GlobalMarker) end

note, between pulls, if you need to assure your next marker is a skull make a macro to use that does /run GlobalMarker = 8

it's hackish, but it works...

This starts at skull and works it's way down.... It still requires you to target -> hit a macro button, but I'm certain in some time I can refine it to mouseover...

I hope this helps.

SDPhantom 10-06-20 02:04 PM

Quote:

Originally Posted by seanjohn24 (Post 337032)
This starts at skull and works it's way down.... It still requires you to target -> hit a macro button, but I'm certain in some time I can refine it to mouseover...

All you really need to do is replace "target" with "mouseover".



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.

seanjohn24 10-07-20 05:01 PM

Quote:

Originally Posted by SDPhantom (Post 337042)
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. :banana: Thanks :banana:

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.

Seerah 10-07-20 06:14 PM

https://www.wowinterface.com/forums/...ad.php?t=43699


All times are GMT -6. The time now is 02:42 PM.

vBulletin © 2021, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI