Instructions
Search for the key bindings of the game in which you want to place a bot. The game manual, the "options menu," the "configurations menu," or the "key bindings menu" are the most common locations of key bindings in the game.
Locate the keyboard command that targets enemies or cycles between targets. For example, "World of Warcraft" uses the tab key for this action.
Open AutoIt and access the code in the center of the page by clicking on it.
Create a line of code that uses the targeting button in the game by writing:
Send, {Tab}
This command should be at the top of the combat script so that your character targets a monster before performing the attack actions. In "World of Warcraft," this line of code would cause your character to target the next monster. Replace "Tab" with whatever key targets the next enemy based on the game.
Include a wait command after the key command. The wait command will cause your character to wait a certain number of seconds after tabbing before tabbing to the next monster. For example, if takes your characters an average of 30 seconds to kill a monster, then you would write: "Wait, 35" to have your character wait 35 seconds between each monster kill. The five extra seconds gives your character some extra slack in case it takes him longer than normal to kill a monster.