Register for your free account! | Forgot your password?

Go Back   elitepvpers MMORPGs Black Desert
You last visited: Today at 02:32

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[ Tutorial / Example ] Pixel Bot - Monster detection, Grinding

Discussion on [ Tutorial / Example ] Pixel Bot - Monster detection, Grinding within the Black Desert forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2024
Posts: 1
Received Thanks: 0
Wink [ Tutorial / Example ] Pixel Bot - Monster detection, Grinding

Hello guys. ( my english sucks but i think you gonna understand )

I gonna release a new version of my pixel bots so i gonna share my currently scripts to auto farm and auto grinding

Are very simple to be honest, this things can also be detectable ( currently i not get banned yet ) but u can play with some variables and get your own idea of how to make your own scripts for evade possible detections

## How it works

First at all you need to understand 3 things to make a script that no need bypass anticheat because pixel bots read directly from the screen ( so yes this scripts needs to keep the game on the top for work ) :

- Object detection model : for detection monster / buttons / others, in the screen
- Data Labeling framework : label-studio in this case
- Libraries needed : to inject kerboard and mouse movements
- Versions : to not have incompatibility with libraries used
- GPU : i tested with a RTX series and works fine, ( this is for realtime object detection )

The idea is simple, detect the object that we want on the screen, then use overlay to watch what the model detects, then manipulate and inject the inputs that we need to move the mouse and use the keyboard


## Tested on
OS : Linux
GPU : RTX ( can works with others too )

## Videos

Video of the results and some codes below ( the videos gonna expire in two days after this post, also i dont know how to embed videos on this forum ) :

Monster detection ( Object detection ) - BlackScreen 3-5 first seconds of this video

Example with auto aim to target the Monster ( Mouse movement emulated ) :


## Creating a simple model with :
- YoloV8
- Label-Studio, with bounding box ( Open source )

IMG


IMG URL ( If the other dont works ) :


## Python simple Scripts

Note :
- Remember stay in the game screen after start the script
- Remember stop the script before leave the game screen

Simple Script ( Auto aim and W press to go to the target, i speak spanish and i dont gonna translate all that shit, but u can have an idea of how it works if u read the code, also is vive coded and then i do simple fixes ) :
Code:
import time
import sys
import numpy as np
import cv2
import mss
import math
from PyQt5.QtWidgets import QApplication, QWidget
from PyQt5.QtCore import Qt, QTimer
from PyQt5.QtGui import QPainter, QPen, QColor
from pynput import keyboard
from pynput.mouse import Controller as MouseController
from pynput.keyboard import (
    Controller as KeyboardController,
)  # ← NUEVO: para simular teclas
from ultralytics import YOLO


class OverlayDetector(QWidget):
    def __init__(self):
        super().__init__()
        # ---------------------------
        # OVERLAY
        # ---------------------------
        self.setWindowFlags(Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint | Qt.Tool)
        self.setAttribute(Qt.WA_TranslucentBackground, True)
        self.setAttribute(Qt.WA_TransparentForMouseEvents, True)
        screen = QApplication.primaryScreen().geometry()
        self.screen_w = screen.width()
        self.screen_h = screen.height()
        self.setGeometry(screen)
        self.show()

        # centro pantalla
        self.center_x = self.screen_w // 2
        self.center_y = self.screen_h // 2

        # ---------------------------
        # MOUSE + KEYBOARD (NUEVO)
        # ---------------------------
        self.mouse = MouseController()
        self.keyboard = KeyboardController()  # ← Controlador para presionar W y 1

        # ---------------------------
        # AIM KEY (Shift sigue siendo el trigger)
        # ---------------------------
        self.aim_key = keyboard.Key.shift
        self.aim_active = False

        # ---------------------------
        # ESTADO PARA LA NUEVA LÓGICA (acercarse + skill)
        # ---------------------------
        self.w_pressed = False
        self.was_close = False
        self.close_threshold_size = 250  # ← AJUSTA ESTE VALOR según tu juego
        # Si el bounding box del monstruo es más ancho que esto = "cerca"

        # ---------------------------
        # CAPTURA
        # ---------------------------
        self.sct = mss.mss()
        self.monitor = self.sct.monitors[1]

        # ---------------------------
        # YOLO
        # ---------------------------
        self.model = YOLO("PATH_TO_YOUR_MODEL/best.pt")
        self.conf_threshold = 0.70
        self.detected_boxes = []
        self.current_target = None

        # ---------------------------
        # TIMER
        # ---------------------------
        self.timer = QTimer(self)
        self.timer.timeout.connect(self.detect_and_update)
        self.timer.start(0)

        # ---------------------------
        # KEYBOARD LISTENER
        # ---------------------------
        self.listener = keyboard.Listener(
            on_press=self.on_press,
            on_release=self.on_release,
        )

        self.listener.start()

    def on_press(self, key):
        if key == self.aim_key:
            # self.aim_active = True
            if self.aim_active == True:
                self.aim_active = False
            else:
                self.aim_active = True

    def on_release(self, key):
        # if key == self.aim_key:
        #     self.aim_active = False
        #     # Liberar todo cuando sueltas Shift
        #     if self.w_pressed:
        #         self.keyboard.release("w")
        #         self.w_pressed = False
        #     self.was_close = False
        pass

    # --------------------------------
    # MOUSE MOVE (RELATIVO REAL)
    # --------------------------------
    def move_mouse(self, dx, dy):
        self.mouse.move(dx, dy)

    # --------------------------------
    # DETECCIÓN + AIM + ACERCAMIENTO + SKILL
    # --------------------------------
    def detect_and_update(self):
        screenshot = self.sct.grab(self.monitor)
        frame = np.array(screenshot)
        frame = cv2.cvtColor(frame, cv2.COLOR_BGRA2BGR)

        results = self.model(frame, imgsz=640, conf=self.conf_threshold, verbose=False)

        self.detected_boxes = []
        self.current_target = None

        for r in results:
            for box in r.boxes:
                x1, y1, x2, y2 = box.xyxy[0].cpu().numpy()
                w = x2 - x1
                h = y2 - y1
                cx = int(x1 + w / 2)
                cy = int(y1 + h * 0.55)  # cabeza
                self.detected_boxes.append((int(x1), int(y1), int(w), int(h), cx, cy))

        # ---------------------------
        # AIM + LÓGICA DE ACERCAMIENTO (NUEVA)
        # ---------------------------
        closest = None
        closest_box = None
        min_dist = 999999

        if self.aim_active and self.detected_boxes:
            for x, y, w, h, cx, cy in self.detected_boxes:
                cx_global = cx + self.monitor["left"]
                cy_global = cy + self.monitor["top"]
                dist = math.hypot(cx_global - self.center_x, cy_global - self.center_y)

                if dist < min_dist:
                    min_dist = dist
                    closest = (cx_global, cy_global)
                    closest_box = (x, y, w, h, cx, cy)  # guardamos el tamaño del box

            if closest and closest_box:
                self.current_target = closest
                tx, ty = closest

                # AIM (suavizado)
                dx = tx - self.center_x
                # dy = ty - (self.center_y - 100)
                smooth = 0.2
                move_x = int(dx * smooth)
                # move_y = int(dy * smooth)
                # if abs(move_x) >= 1 or abs(move_y) >= 1:
                if abs(move_x) >= 1:
                    self.move_mouse(move_x, 0)

                # ====================== NUEVA LÓGICA ======================
                # Usamos el tamaño del bounding box como distancia real (mejor que distancia en pantalla)
                box_w = closest_box[2]
                box_h = closest_box[3]
                box_size = max(box_w, box_h)  # o puedes usar (box_w + box_h) / 2

                is_close = box_size > self.close_threshold_size

                if not is_close:
                    # Aún lejos → presionamos y mantenemos W
                    if not self.w_pressed:
                        self.keyboard.press("w")
                        self.w_pressed = True
                        print("→ Presionando W (acercándose)")
                else:
                    # Suficientemente cerca → soltamos W y tiramos la skill 1
                    if self.w_pressed:
                        self.keyboard.release("w")
                        self.w_pressed = False
                        print("✓ Suficientemente cerca, soltando W")

                    # Solo tiramos la skill UNA VEZ al entrar en rango (evita spam)
                    if is_close and not self.was_close:
                        print("★ Tirando habilidad 1")
                        self.keyboard.press("1")
                        self.keyboard.release("1")  # tap rápido
                        time.sleep(2)

                self.was_close = is_close

        # ====================== LIMPIEZA DE TECLAS ======================
        # Si no hay aim activo o no hay monstruos → soltamos todo
        if not self.aim_active or not self.detected_boxes:
            if self.w_pressed:
                self.keyboard.release("w")
                self.w_pressed = False
            self.was_close = False

        self.update()

    # --------------------------------
    # OVERLAY
    # --------------------------------
    def paintEvent(self, event):
        painter = QPainter(self)
        # centro pantalla
        painter.setPen(QPen(QColor(0, 150, 255), 6))
        painter.drawPoint(self.center_x, self.center_y - 100)  # Centro del personaje
        painter.setPen(QColor(0, 255, 0))
        painter.drawText(self.center_x - 20, self.center_y, "EZ Farming MF")

        for x, y, w, h, cx, cy in self.detected_boxes:
            painter.setPen(QPen(QColor(255, 0, 0), 2))
            painter.drawRect(x, y, w, h)
            painter.setPen(QPen(QColor(0, 255, 0), 6))
            painter.drawPoint(cx, cy)

        if self.current_target:
            tx, ty = self.current_target
            painter.setPen(QPen(QColor(255, 255, 255), 2))
            painter.drawLine(self.center_x, self.center_y, tx, ty)

        painter.setPen(QColor(255, 255, 255))
        painter.drawText(20, 30, "EZ Farming MF")

    def closeEvent(self, event):
        self.listener.stop()
        # Liberar teclas al cerrar
        if self.w_pressed:
            self.keyboard.release("w")
        event.accept()


if __name__ == "__main__":
    app = QApplication(sys.argv)
    overlay = OverlayDetector()
    sys.exit(app.exec_())
For grinding and other things u can use the radar to detect the enemies and move to that direction, the issues comes for these way grinding option when the terrain are not flat ( in this cases u can train a model to get some waypoints from the terrain to understand in wich position there are and create a script to keep the last waypoint to see what can be next movement, also for this cases kernel cheats wit anti-cheat bypass are better than pixel bots, because u can get the positions directly from the memory game and emulate the instruction to move to the next waypoint/target direction/pos )



currently i am working in other scripts for gathering, and others taks, to use less time in the game and do more in the game with less time invested, also i used all the things that i do like a way to reasearch and understand how computer works and how interesting is to emulate and automate things

is not the best script, but maybe u can have now a better understanding of how can make your own simple script to automatizate things, hope it helps

have a pretty weekend
ego904 is offline  
Reply

Tags
blackdesert hack, blackdesert online, grind bot, pixel bot, yolov8


Similar Threads Similar Threads
PixelWoWBot - Pixel Based Fishing and Grinding bot for Retail & Classic !
03/15/2026 - World of Warcraft Trading - 137 Replies
PixelBuddy - The most advanced pixel-based bot for World of Warcraft >>> PixelWoWBot.com <<< https://youtu.be/Afj6T_9Aln4 What is PixelBuddy ? - PixelBuddy is a pixel-based WoW bot. It means that this bot works by looking at the game screen instead of messing with the wow.exe process like injection bot does or other LUA based bot that needs an unlocker.
[Selling] Grinding bot | Slotted | Pixel based.
06/27/2025 - Black Desert Trading - 7 Replies
It's one of the safest bots around, almost no bans have appeared in the one year I have used it personally. The bot is based on pixels, meaning you cannot minimize the game but can use gaming RDP or VPS with high RAM and CPU. Currently open slots: 8 (Updated to 22/10/2024) ( Based on our discord system of availability. Slots can be changed any minute). Bot functions : Auto Grinding Auto repair Auto maid Auto use items
[C#]Pixel Aimbot Example
02/03/2012 - CO2 Programming - 1 Replies
I would not recommend using this nor ever using a pixel aimbot. It's a simply bad way to do it. //This is the native call to the mouse event. public static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint cButtons, uint dwExtraInfo); //mouse buttons private const int MOUSEEVENTF_LEFTDOWN = 0x02; private const int MOUSEEVENTF_LEFTUP = 0x04; private const int MOUSEEVENTF_RIGHTDOWN = 0x08;



All times are GMT +2. The time now is 02:32.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.