Damn, it looks like Blizzard removed the ability to cast spells using a conditional statement. In other words, the CastSpellByName doesn't seem to work if nested in an if statement.

I'm trying to figure out a way out of this problem. For example, I'd be fine if I couldn't cast Barkskin. Really what I want is for that druid who needs healing to ignore the heal command so he doesn't shapeshift out. The only way I can think is to check if the player targeted equals self (using the /script command mentioned) and if so then exit out of the macro. However, I don't know how to call "/stopmacro" from the script command.

Any idea?