WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Macro Help (https://www.wowinterface.com/forums/forumdisplay.php?f=140)
-   -   How can I modify this macro to be more like this other one? (https://www.wowinterface.com/forums/showthread.php?t=58544)

Jynks 01-12-21 08:38 PM

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

Kanegasi 01-13-21 05:26 PM

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


Jynks 02-15-21 02:45 AM

great thank you so much


All times are GMT -6. The time now is 07:32 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI