Need help setting up a macro

This is for wotlk classic but since DF gets more attention, I’m posting it here.

The SPriest rotation in WotLK is pretty simple, but I’m having trouble getting it to work properly.

What I want to accomplish is the following:

Cast this sequence at the start of the macro as an opener and never fire it again except on switching targets or combat: Vampiric Touch, Devouring Plague, Mind Blast, Mind Flay, SW: Pain

Followed by this sequence, repeating a bunch of times: Mind Flay, Mind Flay, Mind Blast, Mind Flay, Mind Flay, Mind Blast, Vampiric Touch, Mind Flay, Mind Flay, Mind Blast, Devouring Plague.

Pop Shadowfiend, Power Word: Shield, and Inner Focus on CD (in wotlk you cant shield yourself if you are already shielded, so it acts as its own CD). This seems to be working well on KeyRelease.

This rotation should keep SW: Pain, VT, and DP up constantly per my calculations.

I’ve tried doing two castsequences, setting them up as actions, and setting them up as sequential loops. The two castsequences seem to work best, but I’m getting a lot more Mind Flays than I should.

Would it be better to create two separate macros?

The more the merrier… I typically always run 2 macros… sometimes 3 depending on class.