def main(): bot = Bot() time.sleep(1) iterations_run = 0 while True: print bot.getDebugText() bot.checkHealth(Keys.CTRL) bot.click(Keys.LEFT, 0.1) bot.click(Keys.D, 0.25) bot.click(Keys.D, 0.25) bot.checkHealth(Keys.CTRL) bot.click(Keys.S, 0.25) bot.click(Keys.S, 0.25) bot.checkHealth(Keys.CTRL) if iterations_run % 2 == 1: bot.click(Keys.A, 0.25) bot.click(Keys.A, 0.25) bot.click(Keys.A, 0.25) print bot.getDebugText() bot.checkHealth(Keys.CTRL) bot.click(Keys.RIGHT, 0.5) bot.click(Keys.D, 0.25) bot.click(Keys.D, 0.25) bot.checkHealth(Keys.CTRL) bot.click(Keys.S, 0.25) bot.click(Keys.S, 0.25) bot.checkHealth(Keys.CTRL) if iterations_run % 2 == 0: bot.click(Keys.A, 0.25) bot.click(Keys.A, 0.25) bot.click(Keys.A, 0.25) bot.checkHealth(Keys.CTRL) # Try to clear mobs every 2 iterations with ultimate ability if iterations_run % 2 == 0: bot.click(Keys.DEL, 0.25) # Buff self every 5 iterations if iterations_run % 5 == 0: bot.click(Keys.END, 0.25) print bot.getDebugText() iterations_run += 1