I've tried everywhere. I'm looking for a macro that will cast hand of reckoning if i target a hostile, and righteous defense if i target a friendly. This one below don't work for w/e reason.
#showtooltip
/cast [@mouseover, help, nodead] [help, nodead] Righteous Defense; [@mouseover, harm, nodead] [harm, nodead] [] Hand of Reckoning