castrandom is 1 word if you are copying from this post. However, I'd not suggest that setup as /castrandom won't ignore the fireball on the shaman's macro and the mage won't ignore lightning bolt. It will cause your DPS to drop as your castrandom will eat roughly half your button presses trying to cast a spell that won't work.
You need 2 macros anyway, just use the proper spells for each class, otherwise you will eventually be running macros that are a huge mess and you will be doing less DPS on all 3 combined than you would on one solo.
Connect With Us