Word of Glory macro

I'm looking for a macro that does Word of Glory on myself with no modifier and @myfriend with shift modifier and @myotherfriend with ctrl modifier, in these macro lines it should be included that I can use all these when my target is an enemy. My old macro made me unable to when my target was an enemy.

That actually looks pretty sweet, only thing is I came up with the last line in my macro to prevent this bug where you can't cast wog on yourself while having targeted an enemy that isn't in range or in line of sight, so together with your macro I might use this in future: