Skip to content
Advertisement

What are ways to create a bot or script that detects monsters in a video game and click on it?

I’ve been trying to create a bot using python for an online mmo web game, and I am facing some issues. I’m using pyautogui, and basically, detects a certain RGB color of a pixel that the monster has and click on it, using the typical nested for loops. The issue here is that sometimes, the bot clicks on an environment on the screen that shares the same pixel RGB color as the monster, so instead of clicking on the monster, it clicks on the ground or any other object in the game.

here’s my code:

JavaScript

What are other ways to detect monster and click? Here’s an image of the monster: enter image description here

enter image description here enter image description here

This method is also really slow in its scan, I move my character and I have to stop for a few seconds for it to scan the screen and detect, and move again.

Advertisement

Answer

well, a while ago I made a code in python for image recognition also in an mmo, I used the locateOnScreen, center and click methods, you can base yourself on these 3 main functions for the development of yours, I’ll leave part of mine below code:

JavaScript

That’s it, hope it helps, sorry for my english because i used google translator

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement