Hi there,
I’ve been mucking around with macros today, and have gotten stuck on something. I want to create a macro which, when casting redemption, will randomly say one of several quotes. In of itself, this is pretty simply done using the following:
/run SendChatMessage(GetRandomArgument(“Statement1”,“Statement2”))
/cast Redemption
But then I wanted to add the condition that the quotes only be said if I was already targeting a dead friendly player. I tried:
/run SendChatMessage(SecureCmdOptionParse([help,dead]GetRandomArgument(“Statement1”,“Statement2”)))
/cast Redemption
But it doesn’t seem to work. I was wondering if any of you wonderful people with more understanding of the macro system and lua could help me out?
Edit: I have found a solution, if anyone else finds themselves in this issue, the macro below should work.
/run if UnitIsDead(“target”) and UnitCanAssist(“player”,“target”) then SendChatMessage(GetRandomArgument(“Statement1”,“Statement2”),“YELL”) end
/cast Redemption