This isn’t working as a castsequence, it’s just a standard conditional. The castsequence needs to be comma delimited. If you use a semicolon, it ends the castsequence and starts a conditional that is met with the [@cursor].
I think it’s probably closer to what @vanslyke wants, but what it’s doing is:
If I have a friendly mouseover target, cast Serenity, otherwise cast Sanctify.
It doesn’t cast Serenity then Sanctify. As far as I can tell, in a castsequence the conditionals are only read at the start of the sequence and apply to everything within it, so you can’t have both @mouseover and @cursor apply to different spells within the same castsequence.
I am a big fan of putting both helpful and harmful spells on the same button, though. For example:
#showtooltip
/use [@mouseover,help,nodead,spec:1/3][help,nodead,spec:1/3] Shadow Mend;[@mouseover,help,nodead,spec:2][help,nodead,spec:2] Flash Heal; [harm,nodead,spec:1/2] Smite; [spec:1/3]Shadow Mend;[spec:2] Flash Heal
What this does is:
If Disc or Shadow spec, and mousing over or targeting a friendly, cast Shadow Mend. If Holy and mousing over or targeting a friendly, cast Flash Heal. Otherwise, if Disc or Holy and targeting an enemy, cast Smite. Otherwise cast Shadow Mend or Flash Heal depending on spec.
Another good one now is:
#showtooltip
/use [@mouseover,help,nodead][help,nodead] Power Word: Shield; [harm,nodead] Shadow Word: Pain; Power Word: Shield
If mousover on friendly, or targeting friendly, use PW:S, otherwise use SW:P