Great bot, just some addvices to make it even greater:
1.Check if the monster is already attacked, because sometimes it just keeps clicking on it even if it's already attacked.
2. Check nearest monster, because sometimes the bot chooses to click on the farthest monster and it keeps running...