Help with macro (if ally then cast X spell on the target of my target, if enemy cast Y spell on target)

any idea how i can make this macro?

/use [help,@targettarget] Pew; [harm] Pew

already tried that, seems like the @targettarget affects the harm one too, or the targettarget having a really weird interaction with it

For clarification…

You want the macro to attack the target your friendly target is looking at

If your target is an enemy, you want to attack that target directly

trying it backwards (first the harm) make that part work (if my target is an enemy the spell works, but the help one doesnt work

have it like this

#showtooltip
/use [harm] Palabra Sagrada: Condena; [help,@targettarget] Palabra Sagrada: Condena

Try

/use [harm] spell; [harm,@targettarget] spell

Pretty sure I told you wrong the first time. I confused myself

didnt work either, but that gave me an idea and it worked

now its like this

#showtooltip
/use [harm] Palabra Sagrada: Condena; [@assist,target=targettarget] Palabra Sagrada: Condena

If both conditions are trying to cast the same spell and you want to make sure it always shows a tooltip, this is the most simple version of the macro that should still work.

#showtooltip
/use [@targettarget,harm,nodead] Palabra Sagrada: Condena

#showtooltip
/cast [harm] [@targettarget,harm,nodead] [] SPELL