Code Monkey home page Code Monkey logo

archero_bot_57's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @fabian57fabian
  • ๐Ÿ‘€ Iโ€™m interested in
    • Machine Learning / Deep Learning / Meta Learning
    • Computer Vision
    • Grafana, Prometheus
    • Arduino / Raspberry
  • ๐ŸŒฑ Currently learning Meta Learning
  • ๐Ÿ‘จโ€๐Ÿ’ผ Currently working @MagentaSRL
  • ๐Ÿ’ž๏ธ Looking to collaborate on ML projects
  • ๐Ÿ“ซ How to reach me: [email protected]

My skills

Grafana Prometheus

Docker DockerCompose

Deep Learning Meta Learning

Python3 Tensorflow Pytorch Flask

Git

My GitHub Stats

fabian57fabian's GitHub stats Top Langs

archero_bot_57's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

archero_bot_57's Issues

Using Android Emulator for bot usage

Is your feature request related to a problem? Please describe.
I would like to run the bot my computer using LDPlayer4 (or Nox, BlueStack..) emulator

Describe the solution you'd like
I want to run the game with bot on the emulator without having my smartphone active

Describe alternatives you've considered
No alternative considered

Stuttersteping

Hi,

For increasing sucessrate, we could get tougher or deadlier.
Both can be done by equipmnt upgrading, but the later can also be done using stuttersteping (around +20~30% atk spd)

Can you add-it plz ?

If you want to centralise all info in the graphic interface, you could make a new box like the level one to let us choose our weapon, each weapon will be associated to a "stutterspeed"

If not, a simple editable file to get data from in which we could put our weapon's name

for example :
staff is 1.15x base atk spd
stutterspeed may be : 0.3s (meaning the bot will wait 0.3s before taping the screen again)

Base speed :
Bow : 1.00
Death Scythe : 0.85
Bright spear : 0.95
Stalker staff : 1.15
Tornado : 1.00
Saw blade : 1.50

I guess with spear (0.95x atk spd) it should be somewhere around 0.36s (will do some testing tomorrow, i'm out of energy)

It could be added after "Checking screen..."
If "In game. Playing but level not ended" => Stutterstep untill next step of the "checking screen" loop.
A good place for taping the screen would be near the center of the direction cross, somewhere close to "close_end" location as there is no other buttons at this place if i'm not wrong.

Tell me your thought ;)

missing file 'datas/statistics.csv'

I tried the bot with Nox and my Android phone (Xiaomi A1), but i get the same error everytime. When i start GameController.py, while having Nox opened or my phone connected, this is what is printed in the Console:

 Errors writing statistics: [Errno 2] No such file or directory: 'datas/statistics.csv'
QPixmap::scaled: Pixmap is a null pixmap
adb server version (36) doesn't match this client (41); killing...
* daemon started successfully
disconnected everything
error: protocol fault (couldn't read status length): connection reset
adb server version (36) doesn't match this client (41); killing...
* daemon started successfully
disconnected everything
connected to 127.0.0.1:62001
Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Program Files\Python39\lib\threading.py", line 954, in _bootstrap_inner
    self.run()
  File "C:\Users\thoma\Downloads\archero_bot_57-master\archero_bot_57-master\WorkerThread.py", line 15, in run
    self.function()
  File "C:\Users\thoma\Downloads\archero_bot_57-master\archero_bot_57-master\UsbConnector.py", line 267, in _oneCheck
    c = self.tryConnect()
  File "C:\Users\thoma\Downloads\archero_bot_57-master\archero_bot_57-master\UsbConnector.py", line 91, in tryConnect
    self._changeConnectedState(True)
  File "C:\Users\thoma\Downloads\archero_bot_57-master\archero_bot_57-master\UsbConnector.py", line 35, in _changeConnectedState
    f()
  File "C:\Users\thoma\Downloads\archero_bot_57-master\archero_bot_57-master\CaveDungeonEngine.py", line 129, in onConnectionStateChanged
    self.initDataFolders()
  File "C:\Users\thoma\Downloads\archero_bot_57-master\archero_bot_57-master\CaveDungeonEngine.py", line 109, in initDataFolders
    self.dataFolders = readAllSizesFolders()
  File "C:\Users\thoma\Downloads\archero_bot_57-master\archero_bot_57-master\Utils.py", line 39, in readAllSizesFolders
    folders = [f for f in os.listdir("datas") if os.path.isdir(os.path.join("datas", f))]
FileNotFoundError: [WinError 3] Das System kann den angegebenen Pfad nicht finden: 'datas'

Hardware description

  • Smartphone: Xiaomi A1 / Nox
  • Screen size: 1920x1080
  • Computer OS: Windows 10 Pro 20H2 Build 1904.867

Screenshots
image

Additional context
Add any other context about the problem here.

Chapter 3 Room 6 Mysterious Vendor

Describe the bug
Unfortunately I found another thing where the bot doesn't work anymore.
If you play room 6 and the player can go all the way into the corners.
Then you choose your reward / skill at the end and the bot wants to go to the next room. But then comes the Mysterious Vendor.
The program thinks that he is already further and is then out of sync.
This only happens if there is nothing in the corners of the room and the player can go into the corners.

Hardware description

  • Smartphone: Huawei Mate 20 Pro
  • Screen size: 1080x2340
  • Computer OS: Windows

Video
Made a video again

Additional context
By the way the Mysterious Vendor always comes at the end of room 6.
#10 Do not know if the same problem occurs there.

Auto CI workflow with github actions using pytests

Feature request:
Add a workflow to automatically test the code on push and pull request.

Describe the solution you'd like

  • Create a .github/workflow/ci.yml file with all the config
  • Create a folder 'tests' for unit tests
  • Start testing all the code
  • Add coverage ratio and ci build Badges on Readme

Describe alternatives you've considered
Manually testing is good but we need to be sure about the main code....

Nox Emulator Running on Instance 0

Hi, i would like to know if its possible that i can edit to let the program run Nox other instances rather than only default 0. device wont be detected if i run other instances like 1 or 2 etc.

Thank you!

Out of sync

Hey again !

Thought about out of sync', i noticed 2 cases :

  • OOS resulting in not a good screen detection, the bot think (in my case) that it's at the lobby when it's still in game.
  • OOS resulting in "i detect something wrong", so it left, letting us in whatever screen we are.

In first case (for me at least) the bot finish by looping in "No energy left".
We could add a count for when this is detected.
To launch a game we need 5 energy, roughly an hour, if we not detect enough energy for more then 2h => Kill archero, reopen it and leave the previous run (big red button).
We should next check for Afk reward / exceptionnal offer as the window may appear.

In 2nd case : the bot just stop for not clicking every where.
Instead of leaving, we could do the same as above : leave the game-reopen it.

You can make it wait for whatever time you want but i think the loop shouldn't exceed 3hours (as we need 4 hours to get full energy charged).

adb commands to start the app :
adb shell monkey -p com.habby.archero -v 1

Not the "real" commands, but to start with package name we need to now activity, i suspect this to change depending on the environnement (emulator or real phone) but idk, this workaround works for me.

To close the app :
adb shell am force-stop com.habby.archero

Regards,

Crash in the last screen

My bot crash in the last screen (end screen) after kill last boss before return in the main menu.
Is there a easy wat for resolve this problem?

Stuck at Quick Raid screen

After tapping "Play", the Quick Raid screen appears but the bot ignores this and continues playing as if the dungeon started.

  • Nox Emulator version 7.0.3.1
  • Screen size: 1080x1920
  • Computer OS: Windows 10

image

Documentation Missing for Mac Installation

Describe the bug
I found that a combination of the Linux and Windows Documentation could be used to install this application on a Mac.

Additional context

Installation on Mac

Follow these steps:

  • Install Homebrew

  • Install ADB

    brew install android-platform-tools
  • Install Python prerequirements

    pip install Pillow matplotlib numpy pure-python-adb
    pip install pyqt5
  • Install Android Studio with sdk (link here)

  • Enable debug mode on your Smartphone (Settings -> about phone/info and tap 7 times on kernel version, then Settings -> debug options, activate it, debug mode and activate it). May vary based on phone model.

Add automatic adb mock tests

Is your feature request related to a problem? Please describe.
Since we added Tests in latest release, we should do some integration tests with adb.

Describe the solution you'd like
We could mock the adb socket using this Gist, so we can pretend to be adb.

Save screenshot of the loot

Is your feature request related to a problem? Please describe.
Save the screenshot of the loot.

Describe the solution you'd like
First of all really cool and good bot.
I have one(two) feature request.

  1. Is it possible that it saves the screenshot from the end in a folder.(endgame.png)
    Then you can check later what and how much he has farmed.
  2. The second one was already requested, that you can also choose chapter 3 for farm

Cannot run

Hi guy, i have problem, can you help me check it ?

Traceback (most recent call last):
File "static_bot_cave.py", line 2, in
from pure_adb_connector import *
File "/Users/phandung/Downloads/archero_bot_57/pure_adb_connector.py", line 35
def adb_screen(name:str = "screen.png"):
^

Auto ability check not working

Auto ability check is not working for me. Unknown ability is saved in abilities_unknown folder. It will automatically select the left ability.

Hardware description

  • Smartphone: Nox Emulator 7.0.3.2
  • Screen size: 1080*1920
  • Computer OS: Windows 10
  • Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32

CaptureArchero

Attempts to start dungeon with 4 energy

The bot will try to start a dungeon when there is only 4 energy instead of waiting for 5 energy. Please see attached video

2022-07-23.21-33-12.online-video-cutter.com.mp4

"Do you wish to debug?" GameScreenConnector arguments

Describe the bug
check_static_coords.py ln 36, arguments, crash see below

Hardware description

  • Smartphone: OnePlus 6
  • Screen size: 1080x2280
  • Computer OS: Windows 10

Screenshots
image

Additional context

F:\Desktop\archero_bot_57-master>python check_static_coords.py
0: 1080x1920
1: 1080x2220
2: 1080x2280
3: 1080x2340
Select your number2
Using datas\1080x2280\screens
Do you wish to debug? (set yes only if you did it already once and found some rows with NO_DETECTION): (y/n):n
Traceback (most recent call last):
File "check_static_coords.py", line 36, in
screen_conector = GameScreenConnector(width, heigth)
TypeError: init() takes 1 positional argument but 3 were given

resolution

hello my son , i really liked your archero thingie .

here is a tip for you , i used an s20 ultra and the resolution wasnt suported so i just adjusted it with this :

adb shell wm size

you can probably put that in your script , if the resolution isnt supported , change it to one that is :)

Enjoy , cheers

Inaccurate Energy Detection

Describe the bug
Getting "No energy left" message even though I have more than 5 energy.

Hardware description

  • Smartphone: Huawei Mate 20 Pro
  • Screen size: 1080x2340
  • Computer OS: Windows

Screenshots
not enough energy
ingame

Additional context
Add any other context about the problem here.

Switch to logging

Why
Because due to different log messages (UI, console, debug and some traces) there is a debug variable in most scripts and also a disableLogs, witch is confusing and adding futile lines to code

Describe the solution you'd like
We will be using 'logging' library from python with a simple configuration to console, a different UI logger only for interface and a simplified logging.info(...), logging.debug(...), logging.error(...) log calls.

Describe alternatives you've considered
Alternatives rely on dabug, trace and info variables in all scripts, but they will be going to be a mess.

This feature will be added by @fabian57fabian

No longer checking quickraid

Describe the bug
Since new update, the program is no longer checking for QuickRaid.

Hardware description
Noxplayer 7.0.2.0
Screen size: 1080x1920

Screenshots
image

Doesn't run

I followed all 3 videos and it still doesn't work
Device doesn't connect on emulator, I keep getting this error:

########################## <<<<<<<<
Updates checked. All right.
failed to connect to 127.0.0.1:5037
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "C:\Users\addse\Downloads\archero_bot_57-master\archero_bot_57-master\WorkerThread.py", line 15, in run
self.function()
File "C:\Users\addse\Downloads\archero_bot_57-master\archero_bot_57-master\UsbConnector.py", line 271, in _oneCheck
c = self.tryConnect()
File "C:\Users\addse\Downloads\archero_bot_57-master\archero_bot_57-master\UsbConnector.py", line 91, in tryConnect
self._changeConnectedState(True)
File "C:\Users\addse\Downloads\archero_bot_57-master\archero_bot_57-master\UsbConnector.py", line 35, in _changeConnectedState
f(self.connected)
File "C:\Users\addse\Downloads\archero_bot_57-master\archero_bot_57-master\CaveDungeonEngine.py", line 225, in onConnectionStateChanged
self.updateScreenSizeByPhone()
File "C:\Users\addse\Downloads\archero_bot_57-master\archero_bot_57-master\CaveDungeonEngine.py", line 233, in updateScreenSizeByPhone
self.screen_connector.changeScreenSize(w, h)
File "C:\Users\addse\Downloads\archero_bot_57-master\archero_bot_57-master\GameScreenConnector.py", line 69, in changeScreenSize
self.specific_checks_coords = loadJsonData(self.specific_checks_path)
File "C:\Users\addse\Downloads\archero_bot_57-master\archero_bot_57-master\Utils.py", line 7, in loadJsonData
with open(path, 'r') as json_file:
FileNotFoundError: [Errno 2] No such file or directory: 'datas\1080x2340\coords\static_specific_coords.json'

I also tried to run "check_static_coords" and doesn't work as well

Stuck at Master on Chapter 6/10 level 1

Love the new update and settings but it's consistently getting stuck when the Master appears in Chapter 6 or 10 level 1.

The error is 'CaveEngine' object has no attribute 'battle_pass_rewards'

image

  • Nox Emulator 7.0.3.1
  • Screen size: 1080x1920
  • Computer OS: Windows 10

TouchManager will no launch and do not open

Hello, is this something broken in the script or something I installed wrong?

C:\archero_bot_57-master>TouchManager.py
Traceback (most recent call last):
File "C:\archero_bot_57-master\TouchManager\TouchManagerView.py", line 252, in update_image_draw
self.DrawLines(pixmap, location, self.model.ui_lines_color_rgb)
File "C:\archero_bot_57-master\TouchManager\TouchManagerView.py", line 274, in DrawLines
painter.drawLine(0, _y, w, _y)
TypeError: arguments did not match any overloaded call:
drawLine(self, QLineF): argument 1 has unexpected type 'int'
drawLine(self, QLine): argument 1 has unexpected type 'int'
drawLine(self, int, int, int, int): argument 2 has unexpected type 'float'
drawLine(self, QPoint, QPoint): argument 1 has unexpected type 'int'
drawLine(self, Union[QPointF, QPoint], Union[QPointF, QPoint]): argument 1 has unexpected type 'int'

Stuck at end screen

Describe the bug
Most of the times after it finishes the chapter (Cave #6) I get an unknown screen error and it stays at the rewards screen. (some times it taps and returns to the main screen without any problems).

Hardware description

  • Device: Nox
  • Screen size: 1080x1920
  • Computer OS: Windows

Additional context
-I tried changing the recheck to true when there is an unknown error in the "CaveDungeonEngine.py" file and adding a screen with the rewards to the 1080x1920 data folder but it didn't work.

-I believe the problem to be one of the following:
-The endgame screen is not recognized when I get 3 lines of rewards instead of 2.
-There is not enough delay before tapping on the endgame screen.

-Screenshots:

  1. https://i.ibb.co/G5SB80L/11111111.png
    2.https://i.ibb.co/1zVMwyL/22222222222.png

Exception Folder doesn't Exist

Hardware description

  • Nox
  • Screen size: [e.g. 1080x1920]
  • Computer OS: [Windows 10]

Since today it's looking for a folder that doesn't exist. If I create the folder from the other on by copying, it doesn't work.
I tried downloading from here again and replace the files but it didn't work

Exception in thread Thread-1: Traceback (most recent call last): File "C:\Users\XXX\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "D:\Software Download\archero_bot_57-master\src\WorkerThread.py", line 15, in run self.function() File "D:\Software Download\archero_bot_57-master\src\UsbConnector.py", line 276, in _oneCheck c = self.tryConnect() File "D:\Software Download\archero_bot_57-master\src\UsbConnector.py", line 96, in tryConnect self._changeConnectedState(True) File "D:\Software Download\archero_bot_57-master\src\UsbConnector.py", line 40, in _changeConnectedState f(self.connected) File "D:\Software Download\archero_bot_57-master\src\CaveDungeonEngine.py", line 177, in onConnectionStateChanged self.updateScreenSizeByPhone() File "D:\Software Download\archero_bot_57-master\src\CaveDungeonEngine.py", line 185, in updateScreenSizeByPhone self.screen_connector.changeScreenSize(w, h) File "D:\Software Download\archero_bot_57-master\src\GameScreenConnector.py", line 73, in changeScreenSize self.specific_checks_coords = loadJsonData(self.specific_checks_path) File "D:\Software Download\archero_bot_57-master\src\Utils.py", line 18, in loadJsonData with open(path, 'r') as json_file: FileNotFoundError: [Errno 2] No such file or directory: 'D:\\Software Download\\archero_bot_57-master\\datas\\1080x2340\\coords\\static_specific_coords.json'

Choose from another dungeons

Hey,
please make a possibility to choose from chpt. 3, 6 (or 10). I found out my character with farming bot on can't beat chpt. 6 at all. Moreover I usually get 1-2 items per chpt.3 and 0 items from chpt.6..

thank you!

64bit nox player

64bit is not working?
I am using NOX player and it only works if it is 32bit.

Mysterious vendor not recognised since latest patch

Describe the bug
Thank you so much for your awesome work and effort you put into the archero bot. Unfortunately since the latest update(archero 1.4.4), the bot doesnt recognise the mysterious vendor that appears in cave stage. It reaches max loops and closes down. I wondered if you could please help me.

Hardware description
My phone is sony xperia xz3.

My screen resolution is 1440x2880.

My computer OS is windows.

*Screenshots
I sent a zip with screenshoots to your yahoo mail, that tries to replicate the folder 1080x2220. I hope it is okey?

Stuck at Level 18

Hi,

Im always stucked at level 18 top right corner. Is there anyway to fix this?

Thank you.
VanCe

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.