Replace SendChatMessage Conditionals

i understand sendchatmessage was removed from combat for security. i am NOT asking for that to be brought back. instead, would it be possible to get conditionals on /y?

eg:
if i had a macro of

#showtooltip
/run m="%t, Accept my seed and be REBORN!!"; if (UnitIsPlayer("target") and UnitIsDead("target")) then SendChatMessage(m,YELL) SendChatMessage(m,WHISPER,nil,GetUnitName("target",true)) end;
/cast [@target, dead, help] Rebirth

could we get conditionals so that

#showtooltip
/y [@target, dead, help] %t, Accept my seed and be REBORN!!
/cast [@target, dead, help] Rebirth

would effectively send the yell part only under the correct conditions.
i expect the cross server whisper is not possible.

Could do both of these with conditions on /stopmacro instead of the individual lines.

#showtooltip
/stopmacro [nohelp,nodead]
/cast Rebirth
/y %t, Accept my seed and be REBORN!!

TYVM!
i was going to ask on the code if i had it right when you updated with the example! TYVM!
somehow i completely missed the use of stopmacro
TYVM!

edit: i had expected the need for the @target

No problem. You used to be able to do this kind of stuff easily with Macro-Talk but it hasn’t been updated for Midnight. If you feel like updating it yourself though its techniques still work (some of the substitutions for hp etc break chat entirely because of secrets so it’s not as simple as just tweaking the toc).

understood. my issue is the whisper is what got most people to notice. as often yell/instance fail due to the amount of stuff the game throws at people. i am going to try

#showtooltip
/stopmacro [nohelp,nodead]
/cast Rebirth
/i %t, Accept my seed and be REBORN!
/y %t, Accept my seed and be REBORN!
/w %t %t, Accept my seed and be REBORN!

but expect the whisper to fail when cross server.

Yeah, not sure about the whisper either. I don’t even know that /w %t would resolve for same server.

i tested. it did not.