GithubHelp home page GithubHelp logo

pbatch / clashroyalebuildabot Goto Github PK

View Code? Open in Web Editor NEW
195.0 5.0 32.0 433.56 MB

A platform for creating bots to play Clash Royale

License: MIT License

Python 100.00%
clashroyale ai computer-vision adb machine-learning bluestacks robotics yolov10

clashroyalebuildabot's Introduction

📌 This bot is under active development and may experience minor issues.
Please report any bugs on Discord, and we will fix them promptly.

ClashRoyaleBuildABot

Welcome to Clash Royale Build-A-Bot! This project provides an advanced state generator that accurately returns detailed information using cutting-edge technologies.

Discord Python 3.10.0 All Contributors

Getting Started | Data | Contributors


Getting Started with Your Clash Royale Bot

Follow these steps to set up your environment:

Watch the Installation Video

or:

  1. Install and Configure the Emulator: Follow our Emulator Setup Guide.
  2. Install Python, PIP, and Git: Go through our Python, PIP & Git Setup Guide.
  3. Install and Configure Your Bot: Use our Bot Installation Guide.

Need help? Join our Discord server.


Data

Name Description Link
units.tar.gz Units in YOLOv5 format Download
numbers.tar.gz Numbers in YOLOv5 format Download

Contributors ✨

A big thank you to all contributors!
This project follows the all-contributors specification.

Link
Link

🔣
Emgimeer-Bazder
Emgimeer-Bazder

🐛
Gavrilovici Eduard
Gavrilovici Eduard

📖 💻
Nyantad
Nyantad

🐛
OwenKruse
OwenKruse

📖 🔣 💻 💡
Martin Miglio
Martin Miglio

💻 📖 ️️️️♿️ 💡 📓
Ankush Sethi
Ankush Sethi

🐛
adl212
adl212

🐛 🔣
Chi Huu Huynh
Chi Huu Huynh

💻
nathan lodge
nathan lodge

🐛
Vedant Jolly
Vedant Jolly

🐛
HorridModz
HorridModz

📖
BjornGrylls
BjornGrylls

🧑‍🏫
Iiro Heinonen
Iiro Heinonen

🐛
Carlos Dubón
Carlos Dubón

🐛
Leviaria
Leviaria

💻 💡 📖
nikita9091239
nikita9091239

🐛
Fikry 🎯
Fikry 🎯

🔬
EnderBenjy
EnderBenjy

💻 🎨

This project follows the all-contributors specification. Contributions of any kind welcome!

clashroyalebuildabot's People

Contributors

adl212 avatar allcontributors[bot] avatar chi-eee avatar enderbenjy avatar gavrilovicieduard avatar leviaria avatar martinmiglio avatar owenkruse avatar pbatch avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

clashroyalebuildabot's Issues

QUESTION

Where should I put adb? I have the platform tools folder. Should I use usb for phone to laptop?

help me

I'm actually don't know about this pip and other stuff I need help I installed the python and click on the setup in the file but that doesn't have any respond......its 3.7 v

about running bot

im new here, how im running this bot?im try running main.py and nothing happened, someone can help?

Create an importable library from this project

Info

I see the intended use for this project in the wiki. The functions I am interested in integrating are the interactions with the trained unit detection model.

The problem

I would like to use this code as a dependency in my own project, but this repository does not have the parts necessary to be a library as a python package.

Possible solution

Changes that make this project into a published package:

  • Add setup file to specify package information
  • Add init files to specify package exports
    • Package exports will allow this package to be imported into other projects as a library
  • Add GitHub automation scripts to compile releases to upload to PyPI
    • Automation scripts will automatically compile distributable wheels for new releases
    • Uploading to PyPI will allow installation through pip

Notes

If this code is intended to not be used as a library, but rather as a template for other projects, then I understand that. I believe opening this project up as a library might provide more functionality to the existing code-base.

Example bot freeze

When I run the example bot it works for a few rounds, but then usually gets stuck on the screen that is displayed at the end of the game.
Additionally I set debug to true but was not able to see the debug.

[Help Wanted] Stuck at setup

Hi, sorry for my noob question. I need help. I've completed the setup till here.

"If successful you should get this message:
connected to 127.0.0.1:"

After that I'm lost. I try this but nothing happens.

"To check that the connection is working try taking a screenshot:
python clashroyalebuildabot/screen.py"

image

Do you have any video to show how to setup and create Bots. Thanks

Unable to start game with the example bot

Hi @Pbatch , I have cloned the repo and was trying to start a example bot as per instructions in the settings section in wiki after setting up the project. But whenever I try to use the example bot it gives error. I have attached the error msg to this post.
image
But at the same time when I run the screenshot file, it is able to generate the screenshot,
screen

pip install missing example file

setup documentation refers to example/main.py which doesn't exist with the pip install, the setup documentation on github is referred to by the pip documentation

Help setting up

Microsoft Windows [Version 10.0.19045.2965]
(c) Microsoft Corporation. All rights reserved.

C:\Users\65ran>adb start-server

C:\Users\65ran>adb kill-server

C:\Users\65ran>adb start-server

  • daemon not running. starting it now on port 5037 *
  • daemon started successfully *

C:\Users\65ran>adb connect 127.0.0.1:5555
connected to 127.0.0.1:5555

C:\Users\65ran>python C:\Users\65ran\AppData\Local\Programs\Python\Python38\Lib\site-packages\clashroyalebuildabot\screen.py
error: more than one device and emulator
Traceback (most recent call last):
File "C:\Users\65ran\AppData\Local\Programs\Python\Python38\Lib\site-packages\clashroyalebuildabot\screen.py", line 41, in
main()
File "C:\Users\65ran\AppData\Local\Programs\Python\Python38\Lib\site-packages\clashroyalebuildabot\screen.py", line 34, in main
cls = Screen()
File "C:\Users\65ran\AppData\Local\Programs\Python\Python38\Lib\site-packages\clashroyalebuildabot\screen.py", line 12, in init
window_size = subprocess.check_output(['adb', 'shell', 'wm', 'size'])
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['adb', 'shell', 'wm', 'size']' returned non-zero exit status 4294967295.

C:\Users\65ran>

Bot doesn't work properly

After I start the bot, it doesn't do anything with no errors. My ADB is connected on port 5555 (Bluestacks).

Great project! Bot suggestions

This is a fantastic project! Some bot ideas:

  • Bridge spam
  • Mirror opponents elixir costs
  • Change placement dependant on opponent placement and tower health
  • Reduce sample spaces of possible moves and/or apply approximate-KNN to chose a move

Bot problems... solutions?

Yesterday I was able to perfectly set up the bot, got it to work completely. It played 2-3 Clash Royale matches for me. Suddenly, the game froze during one of those matches and closed. Then I tried to reopen it, but the bot wouldn't work anymore. I tried everything and the only solution I found was to reinstall the game. It started working again with a new account, but once again, after 2-3 matches, the bot stopped working. It could connect fine, but the bot wouldn't click anywhere. And it wouldn't play automatically either. Before, reinstalling Clash Royale used to fix the issue, but now that doesn't work either. (The problem is that after several matches, the bot seems to stop working and doesn't respond. It doesn't play on its own or do anything, it prints the actions in the console.)

help please

I have everything working but the screenshot part, when i try it it spits these errors out no matter what i try.

Screenshot 2023-04-13 182752

Help Pls

I get an error when trying to take the screenshot to test installation.

Console:

C:\Users\jonat\AppData\Local\Programs\Python\Python39\Lib\site-packages>python clashroyalebuildabot/screen.py
adb.exe: more than one device/emulator
Traceback (most recent call last):
  File "C:\Users\jonat\AppData\Local\Programs\Python\Python39\Lib\site-packages\clashroyalebuildabot\screen.py", line 41, in <module>
    main()
  File "C:\Users\jonat\AppData\Local\Programs\Python\Python39\Lib\site-packages\clashroyalebuildabot\screen.py", line 34, in main
    cls = Screen()
  File "C:\Users\jonat\AppData\Local\Programs\Python\Python39\Lib\site-packages\clashroyalebuildabot\screen.py", line 12, in __init__
    window_size = subprocess.check_output(['adb', 'shell', 'wm', 'size'])
  File "C:\Users\jonat\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\Users\jonat\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['adb', 'shell', 'wm', 'size']' returned non-zero exit status 1.

Typo in Tutorial

I found a typo in the tutorial:

action_class - The base class that each action with belong to.

should be "will" instead of "with".

pip install ClashRoyaleBuildABot not working

pip install ClashRoyaleBuildABot doesn't work, it says:

Collecting ClashRoyaleBuildABot
  Using cached ClashRoyaleBuildABot-1.2.0-py3-none-any.whl (45.3 MB)
Collecting Pillow (from ClashRoyaleBuildABot)
  Using cached Pillow-9.5.0-cp311-cp311-win_amd64.whl (2.5 MB)
Requirement already satisfied: numpy in c:\users\thoma\appdata\local\programs\python\python311\lib\site-packages (from ClashRoyaleBuildABot) (1.24.3)
Collecting scipy (from ClashRoyaleBuildABot)
  Using cached scipy-1.10.1-cp311-cp311-win_amd64.whl (42.2 MB)
INFO: pip is looking at multiple versions of clashroyalebuildabot to determine which version is compatible with other requirements. This could take a while.
Collecting ClashRoyaleBuildABot
  Using cached ClashRoyaleBuildABot-1.1.2-py3-none-any.whl (99.6 MB)
  Using cached ClashRoyaleBuildABot-1.1.1-py3-none-any.whl (99.6 MB)
Collecting pure-python-adb (from ClashRoyaleBuildABot)
  Using cached pure-python-adb-0.3.0.dev0.tar.gz (25 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting ClashRoyaleBuildABot
  Using cached ClashRoyaleBuildABot-1.1.0-py3-none-any.whl (99.6 MB)
  Using cached ClashRoyaleBuildABot-1.0.1-py3-none-any.whl (53.7 MB)
  Using cached ClashRoyaleBuildABot-1.0.0-py3-none-any.whl (25 kB)
ERROR: Cannot install clashroyalebuildabot==1.0.0, clashroyalebuildabot==1.0.1, clashroyalebuildabot==1.1.0, clashroyalebuildabot==1.1.1, clashroyalebuildabot==1.1.2 and clashroyalebuildabot==1.2.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    clashroyalebuildabot 1.2.0 depends on onnxruntime
    clashroyalebuildabot 1.1.2 depends on onnxruntime
    clashroyalebuildabot 1.1.1 depends on onnxruntime
    clashroyalebuildabot 1.1.0 depends on onnxruntime
    clashroyalebuildabot 1.0.1 depends on onnxruntime
    clashroyalebuildabot 1.0.0 depends on onnxruntime

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

[help wanted] How to get enemy position

In the demo.gif you provide
demo
It seems that I can get the tag like "ally_knight" or "enemy_knight" , but I only see
784
And why the blood of the princess tower is "-1"

Use adb for interacting with emulator

What do you think about using the android debug bridge for interacting with the emulator. I think this solution would be more reliable instead of using the Windows API(e.g. you don't have to call set foreground window before taking a screenshot of the current state). Also opening, closing, restarting the game would be easy to implement. I can make a pull request if you think you'd find it useful.

NoneType AttributeError on device.screencap in screen.py

did: pip install --force-reinstall --no-cache-dir ClashRoyaleBuildABot==1.0.1
installed everything perfectly fine.
then did:

python main.py

diff error this time:

python main.py
Traceback (most recent call last):
File "C:\Users\SP\Downloads\ClashRoyaleBuildABot-main\ClashRoyaleBuildABot-main\example\main.py", line 18, in
main()
File "C:\Users\SP\Downloads\ClashRoyaleBuildABot-main\ClashRoyaleBuildABot-main\example\main.py", line 14, in main
bot.run()
File "C:\Users\SP\Downloads\ClashRoyaleBuildABot-main\ClashRoyaleBuildABot-main\example\custom_bot.py", line 40, in run
self.set_state()
File "C:\Users\SP\AppData\Local\Programs\Python\Python39\lib\site-packages\clashroyalebuildabot\bot\bot.py", line 101, in set_state
screenshot = self.screen.take_screenshot()
File "C:\Users\SP\AppData\Local\Programs\Python\Python39\lib\site-packages\clashroyalebuildabot\screen.py", line 19, in take_screenshot
screenshot = self.device.screencap()
AttributeError: 'NoneType' object has no attribute 'screencap'

Originally posted by @gl4d in #37 (comment)

What version of python has to be installed?

Hey, new here.
What version of python needs to be installed?
How could I have figured this out on my own?

I'm having issues installing onnxruntime, I think it's my python version.

Traceback Error

When trying to execute the main.py from examples folder, I keep getting this error.

Traceback (most recent call last):
File "C:\Users\ankus\Downloads\ClashRoyaleBuildABot-main\ClashRoyaleBuildABot-main\example\main.py", line 18, in
main()
File "C:\Users\ankus\Downloads\ClashRoyaleBuildABot-main\ClashRoyaleBuildABot-main\example\main.py", line 14, in main
bot.run()
File "C:\Users\ankus\Downloads\ClashRoyaleBuildABot-main\ClashRoyaleBuildABot-main\example\custom_bot.py", line 47, in run
self._preprocess()
File "C:\Users\ankus\Downloads\ClashRoyaleBuildABot-main\ClashRoyaleBuildABot-main\example\custom_bot.py", line 28, in _preprocess
for unit in v['positions']:
KeyError: 'positions'

I have the dependencies installed as per the guide. Any suggestions on what am i doing wrong?

image

How to run two_six_hog_cycle bot

Hello!
Have any of you guys been able to run the HogCycle bot?
I have everything set up and followed the wiki from top to bottom and everything is working fine.

I can take a screenshot with python clashroyalebuildabot/screen.py

and I can run the example bot with python main.py

but when I tried to run the HogCycle bot it didn't work nor print to the console.

I've tried running python two_six_hog_cycle_action.py and python two_six_hog_cycle_bot.py but none of those work and no error gets printed to the console so I don't know what I'm doing wrong. Even the wiki does not explain how to run it so any help would be very much appreciated.

Error

Pls help (

Torch module installed

Traceback (most recent call last):
File "C:\Users\User\Desktop\Новая папка\ClashRoyaleBuildABot\main.py", line 1, in
from src.bot.pete.pete_bot import PeteBot
File "C:\Users\User\Desktop\Новая папка\ClashRoyaleBuildABot\src\bot\pete\pete_bot.py", line 4, in
from src.bot.bot import Bot
File "C:\Users\User\Desktop\Новая папка\ClashRoyaleBuildABot\src\bot\bot.py", line 20, in
from src.state.detector import Detector
File "C:\Users\User\Desktop\Новая папка\ClashRoyaleBuildABot\src\state\detector.py", line 6, in
from src.state.number_detector import NumberDetector
File "C:\Users\User\Desktop\Новая папка\ClashRoyaleBuildABot\src\state\number_detector.py", line 6, in
from src.state.onnx_detector import OnnxDetector
File "C:\Users\User\Desktop\Новая папка\ClashRoyaleBuildABot\src\state\onnx_detector.py", line 2, in
import torch
ModuleNotFoundError: No module named 'torch'

Issue running main.py

Hello all... I've been getting this error when running the main.py example

Traceback (most recent call last):
File "c:\platform-tools\ClashRoyaleBuildABot\example\main.py", line 18, in
main()
File "c:\platform-tools\ClashRoyaleBuildABot\example\main.py", line 14, in main
bot.run()
File "c:\platform-tools\ClashRoyaleBuildABot\example\custom_bot.py", line 41, in run
self.set_state()
File "C:\Users\Ebert\AppData\Local\Programs\Python\Python310\lib\site-packages\clashroyalebuildabot\bot\bot.py", line 101, in set_state
screenshot = self.screen.take_screenshot()
File "C:\Users\Ebert\AppData\Local\Programs\Python\Python310\lib\site-packages\clashroyalebuildabot\screen.py", line 19, in take_screenshot
screenshot = self.device.screencap()
AttributeError: 'NoneType' object has no attribute 'screencap'

Any ideas on what can be causing it?

Having a tile map would be super helpful.

The title says most of it. I find it super difficult to place my troop where I want them to go because I have to trial and error where the tile that I want to place it at is located. Even a google sheets table would be super helpful. Love the project and I'm excited to see what people are able to do with it.

Bot is unable to take screencaps

Hello, I'm recieving the following traceback when I try and start the bot:

Traceback (most recent call last):
  File "c:\Users\nathanl\Desktop\programming\python\misc\ClashRoyaleBuildABot\example\main.py", line 31, in <module>
    main()
  File "c:\Users\nathanl\Desktop\programming\python\misc\ClashRoyaleBuildABot\example\main.py", line 27, in main
    bot.run()
  File "c:\Users\nathanl\Desktop\programming\python\misc\ClashRoyaleBuildABot\example\custom_bot.py", line 43, in run
    self.set_state()
  File "c:\Users\nathanl\Desktop\programming\python\misc\ClashRoyaleBuildABot\clashroyalebuildabot\bot\bot.py", line 117, in set_state
    screenshot = self.screen.take_screenshot()
  File "c:\Users\nathanl\Desktop\programming\python\misc\ClashRoyaleBuildABot\clashroyalebuildabot\screen.py", line 24, in take_screenshot
    screenshot = self.device.screencap()
AttributeError: 'NoneType' object has no attribute 'screencap'

I'm not sure why the device is None. I've tried restarting the adb server and changing the port to match Bluestack's port.
Additionally, It appears as though my BlueStacks version uses a pseudorandom port number every time it restarts.

image

Maybe I need to downgrade bluestacks versions? Please let me know if you have any ideas :)

Python version

The last version supported by onnxruntime is Python 3.9. Update wiki accordingly for dependency installation to work.

Not dropping cards in battlefield

Hi,

I have setup everything, connection to adb, screenshot is also good, but the botis not taking card, it always says "please choose a card"

How to solve this ?

I also changed bluestacks screen resolution as in the setup tutorial.

How to add card images

Hello! I love this project but I would like to add more cards to the images so more cards can be used & recognized, such as the champion cards. Could you add the rest of the cards in the game or at least tell me how you got these images? Thanks

Traceback (most recent call last) problem

i try build my own code for my account and copy paste from standard folder and change and change it a little, but when i run my own code got problem like this

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\Lib\site-packages\clashroyalebuildabot\bot\giant_bait_arena3\main.py", line 13, in
main()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\Lib\site-packages\clashroyalebuildabot\bot\giant_bait_arena3\main.py", line 10, in main
bot.run()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\clashroyalebuildabot\bot\giant_bait_arena3\giant_bait_arena3_bot.py", line 44, in run
action = max(actions, key=lambda x: x.calculate_score(self.state))
TypeError: '>' not supported between instances of 'NoneType' and 'list'

if i run code from standard folder, code running fine.
how to fix it?

Bounding box

I can't seem to get the bounding box to display. I've created main.py files for petebot and tried the example. None of them are displaying. My emulator is set to 720X1280. I've been reading through the code, but haven't been able to find anything on it.

Consolidation of repositories

Hello

You have a very cool project.

I have now combined our projects and I plan to twist all sorts of cool things

I am migrating to a new resolution and new orientation triggers in the interface, I plan to create a model for training a bot

At the moment, I have assembled a small team for data markup, I will run the markup for bot actions so as not to make classifiers on the rules

link to my project
https://github.com/SergeyPotapov01/bot_Clash_Royale

I would like to contact where the thread in the telegram/discord/whatsapp

If that telegram: https://t.me/Sergey_p7

I need help on your project (although I have already looked through most of it, but there are nuances)

Rename hungry_dragon to baby_dragon & Rename minipekka to mini_pekka

Baby Dragon:

Rename hungry_dragon to baby_dragon:

  • In the characters.csv, it is listed as baby_dragon
  • Easier to write

Mini Pekka:

Rename minipekka to mini_pekka:

  • In the characters.csv, it is listed as mini_pekka
  • It has a space and it is the only card with two words that does not have a space

Where to change:

  • In the code where the values appear
  • In the Wiki
  • CSV
  • Image Name

characters.csv

Improve Pete Bot

Currently, the Pete bot doesn't consider placement that much as it just places in the middle at the front and sometimes tilts to either the left or right. It also doesn't save any elixir and it just goes straight offensive mode. I would love to see it know when and where to place a unit or not and when to save elixir or not. I don't know how difficult that's gonna be to implement but maybe you can give it a try, I would love that! How it uses spells so far though is also pretty good but make it place the spells a bit lower so it can hit them easier while they are moving.

About how to set new Screen IDs in constants.SCREEN_CONFIG[XX].bbox

HI! This is a awesome project!
However, there some SCREEN_CONFIG.bbox settings rule of constants makes me so confuse, such as why OK_bbox setting is like OK_X = 143, OK_Y = 558 ,even ok button's upper left coordinates is (280,1096) approximately.
How to get them?
And I want to add “Party mode” icon in SCREEN_CONFIG for setting a new screen_state, I already screenshot a Party mode png-24 (without Alpha channel), and bbox setting using its upper left coordinates, but I still can not get a low hash_diffs like other state, end_of_game or lobby, down blow 10. Could you please tell me how to set appropriate bbox values?

Here is my party setting in constants:
ClashRoyaleBuildABot\clashroyalebuildabot\data\images\screen
party.png 38X38 24-PNG

party

PARTY_SIZE = 38
PARTY_X = 305
PARTY_Y = 397

SCREEN_CONFIG = {
.....
    'party': {'bbox': (PARTY_X,
                       PARTY_Y,
                       PARTY_X + PARTY_SIZE,
                       PARTY_Y + PARTY_SIZE),
              'click_coordinates': (420, 420)},
}



Any ready custom bot scripts?

Heyo! Is there any ready custom bot scripts made by people that are more efficient than an example? Would be nice to have a set of those

getting these errors

Traceback (most recent call last):
File "main.py", line 12, in
main()
File "main.py", line 8, in main
bot.run()
File "C:\Users\helios\Downloads\kj\ClashRoyaleBuildABot\src\bot\standard\standard_bot.py", line 35, in run
self.set_state()
File "C:\Users\helios\Downloads\kj\ClashRoyaleBuildABot\src\bot\bot.py", line 101, in set_state
screenshot = self.screen.take_screenshot()
File "C:\Users\helios\Downloads\kj\ClashRoyaleBuildABot\src\screen.py", line 19, in take_screenshot
screenshot = self.device.screencap()
AttributeError: 'NoneType' object has no attribute 'screencap'

State generator buggy

I don't know if I'm doing anything wrong... but I've made 3/4 matches so far and everyone of them, the state generator releases wrong information about the units in the field. Even my deployed units get recognized as enemy units. I really hope is not something related to some settings I needed to apply, but so far, every units have been recognized in the wrong way (most of them).
Is the system language might be a problem? The resolution is the one set according to the wiki.

Here some screenshots
screen_state1
screen_state2
screen_state3
screen_state4
screen_state5
screen_state6
screen_state7
screen_state8
screen_state9
screen_state10

bad port number

im trying to Connect ADB to the Bluestacks emulator and its telling me:

bad port number '' in '127.0.0.1:'

any ideas what I did wrong or how I could fix this?

[Help Wanted]

Everything works up until the point I run the random bot or any bot, screenshot works just fine, any suggestions?

new to this sorry

Screenshot (42)
very new to all this trying to get the hog cycle bot what does this mean sorry

discord nymser#4545

C:\Users\12092\AppData\Roaming\Python\Python37\site-packages\clashroyalebuildabot\bot>cd C:\Users\12092\AppData\Roaming\Python\Python37\site-packages\clashroyalebuildabot\bot\two_six_hog_cycle

C:\Users\12092\AppData\Roaming\Python\Python37\site-packages\clashroyalebuildabot\bot\two_six_hog_cycle>python two_six_hog_cycle_bot.py

C:\Users\12092\AppData\Roaming\Python\Python37\site-packages\clashroyalebuildabot\bot\two_six_hog_cycle>python init.py
Traceback (most recent call last):
File "init.py", line 2, in
from .two_six_hog_cycle_bot import TwoSixHogCycle
ImportError: attempted relative import with no known parent package

this is what i get now when i try the bot or action i dont get anything printed out and an import error on init which am i supposed to be using? thank you

do i need to create a main.py?

Turn this into a Deck Tracker - Suggestion

Great project guys!
Is there a way to turn this into a card tracker to know your oponnent cycle and make it work with champions too?
I think thats the better way to have a tool that really helps players

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.