Thread Tools Display Modes
10-03-20, 03:52 PM   #1
alivelele
A Kobold Labourer
Join Date: Jul 2020
Posts: 1
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?
  Reply With Quote
10-06-20, 12:09 AM   #2
seanjohn24
A Defias Bandit
Join Date: Oct 2020
Posts: 2
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.
  Reply With Quote
10-06-20, 02:04 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,308
Originally Posted by seanjohn24 View Post
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.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
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
10-07-20, 06:14 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
https://www.wowinterface.com/forums/...ad.php?t=43699
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » Target macro for raid

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off