SlimShadys / RocketLeagueCrateOpener

This script automatically opens crate for you without the need to push the buttons here and there.
1 stars 1 forks source link
opencv pyautogui python rocket-league

RocketLeagueCrateOpener

This Python script automatically opens crates for you without the need to push/click buttons here and there, since there is no skip animation for the unpacking phase.



Routing
Opened crate with only 'Ok' screen.

Routing
Opened crate with both 'Equip now' and 'Ok' screen.


Installation

In order to run the script, make sure to meet the following library requirement:

You can install them through pip with the following command:

pip install -U pyautogui pygetwindow keyboard opencv-python numpy

Usage

Follow these steps to use the script:

Improvements & tricks

The program will ask you, every time, if the OS default language _(e.g: "en_EN" / "it_IT")_ is the correct one.
If you want to set a default one without the program asking each time, simply set lang=<yourLanguage> at line 93 in crateOpener.py.
Example: lang='Italian'

N.B. This will work if your language does not have multiple codes, otherwise the program will still ask you which code you want to choose among the ones above (as for example with English, since you have ['en_EN', 'en_US', 'en_GB']).
If you want to directly link up a code, set code=<yourCode> at line 94 in crateOpener.py.
Example: code='en_EN'.
At this point, the lang variable can safely assume value None or any other value, since code has priority over lang.


If you set a custom language (e.g., 'French') and the script complains about a missing file in the buttons folder, it means the equip now button for your language is missing.
To solve this, manually open a crate and crop the 'Equip now' button. Then, you can either send a Pull Request on this repository or contact me via email (gianmarcoscarano@gmail.com) to add that button in your language.
This is necessary because OpenCV needs to match the button you specify in the script, with the button present in the game. If you load the English version of 'Equip now', but set your game language as 'French', the two buttons will not match and the script will fail.