will7200 / Yugioh-bot

Bot for Yugioh Duel Links via Nox and Steam
MIT License
58 stars 9 forks source link
bots duellinks nox python3 steam yugioh yugioh-duel-links

Yugioh Bot

Join the chat at https://gitter.im/Yugioh-bot/Lobby Discord Software License Build status Coverage Status Quality Score

Bot to help with those npc in Yugioh Duel Links.
Currently working on phasing python version into golang to help with better concurrent processes, data updates will be streamlined, and distribution will be easier.
Check the progress here go port.

Features

Prerequisites

Have Nox installed (https://www.bignox.com)
-- Note: Windows 10 Users make sure to disable Hyper-V in window services otherwise BSoD errors will occur.
Alternatively have Yugioh for steam installed.
Python 3.5 or 3.6 (https://www.python.org/downloads/, https://www.anaconda.com/download/)

Install

Via git

$ git clone https://github.com/will7200/Yugioh-bot
$ cd Yugioh-bot
$ pip install -r requirements.txt
$ python install.py

Via zip file -- Unzip Contents

$ cd Yugioh-bot
$ pip install -r requirements.txt
$ python install.py

If you are using conda, here is a powershell script that will help

$ Get-Content requirements.txt | ForEach-Object {
conda install --yes $_
}

Afterwards Nox

Skip to 6 on this list if you used python install.py

  1. Install tesseract (http://3.onj.me/tesseract/)
    If the above link is giving issues or is slow: Tesseract at UB Mannheim (https://github.com/UB-Mannheim/tesseract/wiki)
    -- Note: Testings occured on the 3.05.01 version
  2. opencv_python‑3.3.1+contrib and cv2+contrib 3.2.0 tested (http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv) -- Note: pypi package will now install cv2+contrib from requirements.txt
  3. Copy downloaded tesseract folder into bin\tess\
  4. Copy C:\Users\USER_NAME\AppData\Roaming\Nox\bin\nox_adb.exe as adb.exe into bin directory
  5. Copy C:\Users\USER_NAME\AppData\Roaming\Nox\bin\AdbWinApi.dll into bin directory
  6. Set Nox as 480x800 phone
  7. Download Yugioh app
  8. Setup Yugioh app, link, etc... (first time only)

Afterwards Steam

Skip to 4 on this list if you used python install.py

  1. Install tesseract (http://3.onj.me/tesseract/)
    If the above link is giving issues or is slow: Tesseract at UB Mannheim (https://github.com/UB-Mannheim/tesseract/wiki)
    -- Note: Testings occured on the 3.05.01 version
  2. opencv_python‑3.3.1+contrib and cv2+contrib 3.2.0 tested (http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv) -- Note: pypi package will now install cv2+contrib from requirements.txt
  3. Copy downloaded tesseract folder into bin\tess\
  4. Under the bot section in the config.ini file change the provider to Steam instead of Nox.
  5. Make sure to have the steam app installed.
  6. Note the detection system for the Steam app hasn't been optimized for it yet, so there will be a lot of false positives and true negatives.

    Usage

To Start The Bot

$ python main.py bot -s

Generate Config File -- Only Needed if you did not git clone master

$ python main.py config --generate-config {optional --file-path path/to/file/config.ini}

The bot creates a file for runtime purposes that is specified in the config file name runtimepersistence under the bot section.

The following values can be changed during runtime that will control the bot until the ui has been made. ["run_now", "stop", "next_run_at"]

run_now: if the bot is currently stopped it will schedule a run immediately
stop: if the bot is currently running it will halt execution
next_run_at: will schedule a run at the specified time, if currently running it will remove the current job in place of the new one

GUI

$ pythonw main.py gui -s

This will start the bot with gui controls.
So far the following signals have been implemented:

Wakatime

Check out what files I'm working on through WakaTime

Change log

Please see CHANGELOG for more information on what has changed recently.

Security

If you discover any security related issues, please open a issue with "[Security]" as the prefix.

Credits

The MIT License (MIT). Please see License File for more information.