Hello guys

Im looking for a macro. What it should do.

Heal if you have a friendly target. Stopcasting if you have no friendly target, or an enemy targeted.

Ideas?

Thanks