This script automates the process of rerolling quests in Lee:// RPG. It utilizes OCR to read from screen.
-
Install Dependencies:
- Open a command prompt or terminal.
- Navigate to the directory containing
reroll.py
andrequirements.txt
. - Run the following command to install required packages:
pip install -r requirements.txt
- Install Tesseract
- Download and install Tesseract
- Add Tesseract to path
- Open Start Menu and search for "Environment Variables".
- Click on "Edit the system environment variables".
- In the System Properties window, click on the "Environment Variables" button.
- In the Environment Variables window, find the "Path" variable under System variables and select it. Click "Edit."
- Click "New" and add the path to the Tesseract executable directory (e.g., C:\Program Files\Tesseract-OCR).
- Click "OK" to close all dialog boxes.
- Verify installation by running
tesseract -v
in commmand prompt
-
Configure Screen Regions:
- Run
py regions.py
. This script allows you to select specific regions on your screen where quests and reroll buttons are located. - Follow the on-screen instructions to select regions for Quests and their respective reroll buttons.
- Save the regions when prompted. This will generate a
regions.json
file thatreroll.py
will use.
Make sure to leave some margins around the text and to not get the Kill Quest label in the quest area!
- Run
-
Configure
config.json
:-
Ensure
config.json
is present in the script's directory with the following parameters:minimum_chests
: Minimum number of chests required in each quest.chest_type
: Type of chest to roll for.delay
: Delay (in seconds) between each reroll.start_keybind
: Keyboard key to start the reroll process.kill_keybind
: Keyboard key to stop the script.
For the template, check config.json.example
-
-
Run the Script:
- Run
py reroll.py
to execute the script. - Once started, press
start_keybind
(configured inconfig.json
) to begin the reroll process. - Press
kill_keybind
(configured inconfig.json
) to stop the script at any time.
- Run
- If the script does not behave as expected, ensure all dependencies are correctly installed and configured.
- Check
latest.log
for error messages or warnings that may indicate issues with screen resolution or configuration files.
For further assistance, open an issue or refer to the documentation of the libraries used in this script.
Much love to all of the people that helped me with this script.
Thanks to lmmortalz that contributed ALOT to this project.
Want a new feature? open an issue!
- script pause
- gui/tui
- .exe file, so people that doesnt know how to use computer and chatgpt can run this thing
Remember that contributes are welcome :)