Modern bots use reflection on the client itself, including faking the MouseEvent to the canvas/applet. Some bots use typical autohotkey style automation of just moving the mouse around and using color pickers/opencv to validate actions. Packet bots are rare but still do exist, AutoRune was one of them and it was used to duplicate items etc.