This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 141
Testing a Bot Without the UI
Kell edited this page Jan 18, 2023
·
4 revisions
- If you are testing a RuneLite bot, make sure RuneLite has been launched via OSBC.
- Make sure your bot's options have been initialized with values in its
__init__()
function. - Open
src/OSBC.py
and scroll to the bottom of the file. - You'll see some code saying
if __name__ == "__main__":
. This is the entry point for the program. By modifying a few lines here, we can forceOSBC.py
to run our bot immediately. - Read & address each comment carefully, they tell you exactly what you need to do.
- Running the
OSBC.py
will run the bot immediately.
Here is an example of OSBC.py
configured to automatically play the OSRSWoodcutter
bot when the file is run:
if __name__ == "__main__":
from model.osrs.woodcutter import OSRSWoodcutter
app = App(test=True)
app.test(OSRSWoodcutter())
# IMPORTANT
# - Make sure your bot's options are pre-defined in its __init__ method.
# - You can stop the bot by pressing `Left Ctrl`