A little more detail on the order of operations, based on the bit of the macro you posted above:
/cast Phantom Singularity /cast [talent:6/2] Haunt /castsequence Unstable Affliction, Unstable Affliction /cast Deathbolt /castsequence reset=target/3 Shadow Bolt, Shadow Bolt /castsequence reset=target/3 Agony, Shadow Bolt
With perfect casting times, here’s what will happen:
Phantom Singularity (if off cooldown)
Haunt (if off cooldown and talented)
Unstable Affliction
Deathbolt (if off cooldown)
Shadow Bolt
Agony
Unstable Affliction
Shadow Bolt
Shadow Bolt (if more than 3 seconds have passed since the last time the macro key was pressed, Agony)
repeat
You will never be able to line up Agony/Corruption/2-3 UA’s on a target and have Deathbolt drop via a macro. It just isn’t possible unless you’re manually pressing the key. With AutoHotKey or whatever, you’ll end up skipping spells too much. I’ve spent a lot of time trying to line things up properly.
Get rid of the reset for the line with two Shadow Bolt spells. Reset is pointless there, since it’s the same spell. Even after 3 seconds have passed, it’s still going to reset back to Shadow Bolt anyway.
Phantom Singularity, Haunt, and Deathbolt will be skipped a lot if your macro spam speed is too fast.
Blizzard forbids mods from choosing spells for you, so the best we can hope for is “close enough”.
The closest you will become to lining up the spells you want would be to go with a Priority macro, and something like this:
/cast [talent:6/2] Haunt /castsequence Phantom Singularity, Unstable Affliction /castsequence Unstable Affliction, Deathbolt /castsequence Unstable Affliction, Shadow Bolt, Shadow Bolt, Shadow Bolt, Agony
If all goes to plan, the output would be:
Haunt
PS
UA
UA
UA
Deathbolt
SB
SB
SB
Agony
This is because GSE is dumb and moves on to the next line as soon as a spell is sucessfully cast, whether it’s a castsequence or not. Doesn’t matter. Things would be sooooo much easier if stayed on the current line.
Deathbolt being a part of a castsequence above and having a cooldown means it will lock the macro if it is infact on cooldown. If you are out of Shards at any point in the macro, you will lock, as the macro will wait for a Shard to cast Unstable Affliction.
Welcome to the wonderful world of trying to line things up with GSE.