Macro Target Random Friendly Player

Hello!
I’m searching for a macro/addon that allows me to randomly target a Friendly Target.
The why? Because i’m a MW Monk player and with the actual state of the class, Chi-ji ramps are played with such insane amount of Haste that you lose time bitween GCD’s when interracting with Raid Frame to put the 2/3 stacks envelopping mists.

I know that some pretty close stuff exists.
I found on wago a « weakauras/custom addon » that allows priest to use PI randomly on the raid players. I tried to adapt this with my envelopping mist but failed since my knowledge is really limited.

If anyone can help me about that, it would be really cool!
Thanks for reading, dear Wowers.

#showtooltip
/cleartarget
/targetfriend
/cast [@target,help,nodead][] YourSpell

You even can specify to drop & pick new targets only if you’re in a group or raid :

#showtooltip
/cleartarget [group]
/targetfriend [group]
/cast [@target,help,nodead][] YourSpell

Thanks for your answer!

I tried the /targetfriend solution but when i try it IG it seems like it always take the first same target (in the direction i’m facing) and then it starts cycling players the closer to where i’m facing. The probleme there is that when i’m in my Chiji Ramp i need to interract once every 2/3 GCDs only with my Raid/Group Frame. So if i keep facing the same direction, this macro will always target the same player.
I may be missunderstanding something tho but that’s my conclusion !

Yes that’s what it does.

It will (as with « /targetenemy ») target the closest valid target in front of your camera, but you didn’t specify you wanted to cycle through different targets, neither the need of ones that didn’t have the healing spell on them, and that’s a whole different case to bring… and will require something completely out of reach from this simple macro.

Sorry.

No problem. And thanks for your time!