#showtooltip Chain Heal(Rank 5)
/cast [target=mouseover,help,exists] [target=target,help,nodead] [target=targettarget,help,nodead] [target=player] Chain Heal(Rank 5)
Make sure that it's all one line with spaces between the brackets. You no longer need to have the target selected; just mouseover. If it's friendly and alive, casts the spell. If it's an enemy and targetting an allied player or mob, casts the spell. Replace said spell with whatever heal you wish. if none of these conditions apply, it casts it on you.