I wrote a pretty sophisticated AHK bot a while back that I got a lot of 99s in being a color bot, but pretty much only I can use it since it's so complex. I can give it to you, but it was so complex I would just recommend getting into scripting one yourself.
If you're also good at Java, you can decompile most servers, figure out the packets, and write a full bot. Lastly, if it's a 317 server and non-obfuscated, you can run a full fledged bot with Parabot as well.
If you're on Linux, I recommend Autokey, it's about as powerful as AHK and can also record actions.
I also abuse Ghostmouse a lot. Using the free version, record a script, save it, then open the file in notepad and copy-paste it 100,000 times to make it last longer.