Contrary to popular belief, /castrandom doesn't automatically pass spells on cooldown.
That needs to be sticky at the top of the forum, cause its true.


Ok its looks to work, but only if you press the key at spicific intervals, if you KNOW you can press a key say eactly every .5 seconds then you can also write a /castsequence to do the same thing. It works because of the assumption you know the speed at which you press the keys.

By spamming 1, the macro will play out as follows: Insect Swarm is cast, Moonfire is cast, wrath, wrath, wrath, etc until the 12 seconds it take for moonfire's artificial cooldown to expire is up, at which point it is cast again. A few more wraths will fire off until the 18 second mark hits, at which point Insect Swarm will be reapplied. This will continue for as long as you have mana and a target.
Asssuming just for sake of argumet that Wrath has a 2 second cooldown and is an instant spell, and assume you press the key every 2 seconds:

You could do: /castsequence Moonfire, Insect Swarm, Wrath, Wrath, Wrath, Warth, Moonfire, Wrath, Wrath, Insect Swarm, Wrath, Wrath

His is a touch more efficient but ...