put the character in the farm zone and transfer the auto attack or the auto attack of the pets (if you are a petolov) or a joint attack on the key 1. The macro itself will choose the target and attack , and you will be happy :)
Download the program (Download) and go to the macro editor
press the button «Open file»
and select the downloaded file
assign a macro to a key and run the program