The OldSchool Runescape Computer Vision Bot

takelley1 takelley1 Last update: Aug 19, 2022

OCVBot

The OSRS Computer Vision Bot

  • This bot is an image bot, meaning it interacts with the game client the sameway a human does: by looking for specific images or patterns and respondingaccordingly. No client injection, reflection, or modifications of any kind areused. This makes the program undetectable using traditional methods.
  • All interactions with the game client are randomized to the greatest extentpossible. This includes randomized mouse movements, click coordinates, waitdurations, and session durations.
  • If you have a question about how the program works, please open an issue.
  • Alchemy:Alchemy GIF
  • Banking and navigation:Chef GIF
  • For a full list of behaviors, see docs/scenarios/

INSTALLATION

  • Requires Python 3.9+
  1. Clone this repository into your home directory.
cd ~git clone --depth 1 https://github.com/takelley1/OCVBot.git
  1. Create and activate a Python virtual environment.
cd OCVBotpython3 -m venv ocvbot_venvsource ./ocvbot_venv/bin/activate
  1. Install OCVBot's Python dependencies into your virtual environment.
pip3 install -r requirements.txt
  1. Create a file in the credentials directory called username.txt and addyour account's username to it.
echo "ThisIsMyUsername" > ./ocvbot/credentials/username.txt
  1. Create another file in the credentials directory called password.txt andand your account's password to it. Accounts with 2-factor authentication arenot supported.
echo "ThisIsMySuperSecretPassword" > ./ocvbot/credentials/password.txt
  1. In the ocvbot directory, copy config.yaml.example to config.yaml.
cp ./ocvbot/config.yaml.example ./ocvbot/config.yaml
  1. Read and edit config.yaml with your desired configuration settings.

  2. Check docs/scenarios for the proper client configurationsettings and information about each script.

  3. Launch the OldSchool Runescape client. A wrapper script is provided inthe tools directory.

./tools/osrs.sh
  1. Adjust your client to match the screenshots in docs/scenarios.Make sure your character is in the correct starting position before runningthe bot.

  2. Start the bot.

python3 ./ocvbot/main.py
  • To stop the bot, use CTRL-C on the terminal window running the bot.
  • To exit the Python virtual environment, run deactivate.

NOTE: You must activate the Python virtual environment every time you wish to run the bot!Run cd ~/OCVBot && source ocvbot_venv/bin/activate

CONFIGURATION

  • Currently OCVBot is configured via a few basic settings in theocvbot/config.yaml file. Please see the comments in that file for informationon how to configure each parameter.
  • The bot takes random short breaks, so don't be alarmed if it appears to donothing for a short while. The program's log output will indicate when this occurs.
  • For more technical users, comprehensive API documentation is available infunction docstrings.

This bot was written for educational purposes only. I am not responsible for howyou use this software.

Subscribe to our newsletter