The above should preserve the original intent of the macro while keeping the language usage correct. I am personally against /castrandom for anything other than picking mounts, but I can see why it's being used there. I just hope you have strong tendons in the finger that will be hammering the key over and over.