Quantcast
How can I modify this macro to be more like this other one? - WoWInterface
Thread Tools Display Modes
01-12-21, 08:38 PM   #1
Jynks
A Cobalt Mageweaver
Join Date: Oct 2006
Posts: 240
How can I modify this macro to be more like this other one?

I have this macro for finding these plants for a WQ in Ardenvale... when I press the button it tries to target the flower, then puts a symbol on it and then plays a sound...

Code:
/cleartarget
/tar lunarlight bud
/run local r,T,t,a=SMRI,nil,"target",{8,7,1,2,3,4} if not r then r=1 end if UnitExists(t)then T=t end if T then if GetRaidTargetIndex(T)==nil then SetRaidTarget(T,a[r]) PlaySound(120,"master") r=r%#a+1 end end SMRI=r
How can I change this to cycle through all the target marks? This one only seems to do 5? Basicaly I would like it to do the same thing but go through the entire target mark list before it removes the first mark placed to the latest find.

Thanks
  Reply With Quote
01-13-21, 05:26 PM   #2
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 575
The "a" table with the numbers contains the marker ids. It only has 6, in order: skull, moon, square, triangle, diamond, and cross. You just need to add the other two, which is 5 for star and 6 for circle.

I rewrote the script to include all eight markers, ordered in the same way the UI orders them (Skull, Cross, Square, Moon, Triangle, Diamond, Circle, then Star), and making the entire thing shorter and cleaner. The macro you have is 249 total characters long, mine is 232.

Code:
/cleartarget
/tar Lunarlight Bud
/run local m,t={8,4,1,7,2,3,6,5},"target" CycTarMar=CycTarMar or 1 if UnitName(t) and not GetRaidTargetIndex(t) then SetRaidTarget(t,m[CycTarMar]) PlaySound(120,"Master") CycTarMar=CycTarMar%#m+1 end
  Reply With Quote
02-15-21, 02:45 AM   #3
Jynks
A Cobalt Mageweaver
Join Date: Oct 2006
Posts: 240
great thank you so much
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » How can I modify this macro to be more like this other one?

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