-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
478 additions
and
420 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ruff==0.6.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
__pycache__ | ||
venv | ||
venv | ||
.ruff_cache | ||
error_log.txt | ||
error/* |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,6 @@ | |
|
||
The Dokkan Battle EZA Farming Bot is a Python script designed to automate the process of farming the Extreme Z-Awakening levels in Dragon Ball Z Dokkan Battle. The script runs on your computer and interacts with the game on your phone. | ||
|
||
_This bot is no a autoclicker_; it not only completes the levels but also manages the current level of the EZA and switches between different EZAs. | ||
|
||
|
||
|
||
If you encounter any errors or have any doubts, you can create an issue or contact me at [email protected]. | ||
|
||
## Features | ||
|
@@ -20,6 +16,8 @@ If you encounter any errors or have any doubts, you can create an issue or conta | |
- It identifies buttons and actions using images, so it can adapt to different screen sizes and resolutions. | ||
- Can swipe bettwen eza and only | ||
|
||
***Tip***: If the bot doesn’t seem to be working correctly, particularly if it's failing to detect buttons or actions in the game, try replacing the images in the script with screenshots from your own game setup. These images are used to identify in-game elements, and if your screen layout differs, custom screenshots may improve accuracy. | ||
|
||
## Requirements | ||
|
||
1. You need an Android device with USB debugging enabled. This allows the script to communicate with the phone via a USB cable. | ||
|
@@ -65,11 +63,3 @@ This project is intended for educational and personal use only. The use of autom | |
## Contributing | ||
|
||
Contributions to this project are welcome! If you encounter any issues, have suggestions for improvements, or want to add new features, feel free to open an issue or submit a pull request. | ||
|
||
## License | ||
|
||
This project is licensed under the [MIT License](LICENSE). | ||
|
||
--- | ||
|
||
Feel free to modify the README according to your project's specific details, and don't forget to add a proper license file (e.g., `LICENSE`) to your project if you plan to share it with others. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from adbutils import adb | ||
from src.image import ImageProcessor | ||
import cv2 | ||
import numpy as np | ||
|
||
device = adb.device() | ||
|
||
image_path = "Images/OK2.jpeg" | ||
image_processor = ImageProcessor() | ||
|
||
|
||
class Debug: | ||
@staticmethod | ||
def draw_rectangle_around_match(screenshot, top_left, w, h): | ||
cv2.rectangle( | ||
screenshot, top_left, (top_left[0] + w, top_left[1] + h), (255, 0, 0), 2 | ||
) | ||
cv2.imshow("Matched Image", screenshot) | ||
cv2.setWindowProperty("Matched Image", 1, cv2.WINDOW_NORMAL) | ||
cv2.waitKey(0) | ||
cv2.destroyAllWindows() | ||
|
||
|
||
screenshot = np.array(device.screenshot().convert("RGB"), dtype=np.uint8) | ||
template_image = cv2.imread(image_path) | ||
|
||
found, x, y = image_processor.find_image_position(template_image, screenshot, threshold=0.8) | ||
|
||
if found: | ||
Debug.draw_rectangle_around_match(screenshot, (x, y), *template_image.shape[:2]) | ||
else: | ||
print(f"Image {image_path} not found in current screen.") |
Oops, something went wrong.