In short: BeaTzVision does the same thing in a loop: it photographs the game window, converts the image so that detection stays stable, searches it for the Metins you captured, picks the closest target and then simulates mouse and keyboard. The game process is never touched.
1. Capturing the window
The bot does not photograph the whole screen, only the area of your game window. That is faster, and it keeps Discord, a browser or a second client out of the detection.
Areas that get in the way can be hidden with masks. The bot paints them black in the captured image before it even starts searching. Typical candidates are the chat, the minimap or a status bar where something occasionally appears that resembles a Metin.
2. Preparing the image
The colour image then becomes a greyscale image. That sounds like losing information, but it is exactly right: shape and contrast decide a match, not colour.
CLAHE runs on the greyscale image, a contrast equalisation that splits the picture into 8×8 tiles and brightens or darkens each tile on its own. The difference to global brightening is large: a stone in the shade of a tree and the same stone in bright sunlight end up looking similar enough that one template finds both.
Most detection problems on private servers come from brightness: different gamma values, different effects, a different time of day in game. Contrast equalisation absorbs part of that. The rest is down to how you capture.
3. Finding stones
Now comes the actual search, template matching. Your captured image is slid across the live image, and for every position OpenCV calculates how well the two fit. The result is a value between 0 and 1. Above your threshold, the stone counts as found.
Two things make this more robust than it sounds:
- Nine zoom levels. The template is tried from 0.8 to 1.2 times its size. That way a stone is still recognised when it stands further away or you zoomed the camera differently. This is the auto-zoom feature.
- An edge image as a fallback. If the best value stays just below the threshold, the bot additionally computes an edge image and searches again in that. There, only outlines count, not surfaces. This rescues matches where the background colour changed.
For things that are more reliably recognised by colour, such as health bars or player dots on the minimap, the bot works in the HSV colour space instead. There, hue, saturation and brightness are separate, which lets you say "this hue, no matter how bright".
4. Picking a target
Usually the bot finds several stones at once. All matches are sorted by their distance to the centre of the screen, and the centre is your character. The nearest stone goes first, because the shortest walk yields the most stones per hour.
Around your own character there is an exclusion zone of roughly 80 pixels. Matches inside it are discarded. Without it, the bot would occasionally click your own horse, your own name or an effect on the character.
5. Clicking and typing
Finally the image coordinates become an input. The mouse moves to the position, waits briefly and then clicks. Key presses are held for roughly 70 to 140 milliseconds, and releasing takes another 40 to 80. These times differ slightly with every single click.
The input goes through the normal Windows input path, optionally through a driver at the level of a real mouse. In both cases it is an ordinary input event, the kind any other program produces.
Why this matters on private servers
Every private server has its own Metin models, its own interface and often its own effects. That is exactly why you capture the stones yourself instead of using a shipped list, and why captures are stored per server. Switch servers and the bot switches templates with you. Whether yours is in the server list, you can check there.
The second point is the architecture: no access to the game process, no hook, no modified file. What that means technically is covered in Pixel Bot vs. Memory Injection. How to configure detection in practice is in the farmbot guide, and if nothing is detected at all, the troubleshooting guide helps.
Frequently asked questions
Does BeaTzVision read the game's memory?
Why do I have to capture the stones myself?
What does the detection threshold mean?
Why does the bot click the nearest stone first?
Ready to try it yourself?
Join the BeaTzTools Discord and get access to BeaTzVision and BeaTzSignal, setup guides and support.
Try it free →