diff --git a/README.md b/README.md index e9ebaefa..377e4f5e 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,27 @@ ### ⚠️ This project is in Alpha stage ⚠️ # ![](documentation/media/logo.png) -OSRS Bot COLOR (OSBC) is a desktop client for controlling and monitoring automation scripts (bots) for Old School RuneScape and private server alternatives. This application is paired with a custom library of tools for streamlining the development of new bots. Unlike most botting frameworks that employ code injection into the game client, OSBC uses a combination of color manipulation, image recognition, and optical character recognition to navigate the game. The goal of OSBC is to provide a fun learning experience for new & seasoned developers alike! +OS Bot COLOR (OSBC) is a desktop client for controlling and monitoring automation scripts. This application is paired with a toolkit for writing new scripts. Unlike popular automation frameworks that modify/inject code into a game's client, OSBC is completely hands-off; it uses a combination of color detection, image recognition, and optical character recognition to navigate the game. The goal of OSBC is to provide a fun and educational learning experience for new & seasoned developers alike, emphasizing the exploration of automation technologies and not to encourage or support activities that are in violation of any game's Terms of Service. 💬 [Join the Discord](https://discord.gg/Znks7Smya4) to discuss the project, ask questions, and follow development + ⭐ If you like this project, please leave a Star :) -

- - Buy Me A Coffee - -     - - PayPal - -

- # Table of Contents +- [](#) +- [Table of Contents](#table-of-contents) - [Developer Setup ](#developer-setup-) - [Documentation](#documentation) - [Features](#features) - [User Interface](#user-interface) - [Script Log](#script-log) - [Simple Option Menus](#simple-option-menus) - - [RuneLite Launcher](#runelite-launcher) - - [Any Client Size, Anywhere](#any-client-size-anywhere) - [Human-like Mouse Movement](#human-like-mouse-movement) - - [RuneLite Leverage](#runelite-leverage) - - [Object Detection](#object-detection) - - [API](#api) + - [Object Detection](#object-detection) - [Random Click Distribution](#random-click-distribution) - [Efficient Image Searching](#efficient-image-searching) - [Lightning Fast Optical Character Recognition](#lightning-fast-optical-character-recognition) @@ -54,7 +44,7 @@ See the [Wiki](https://github.com/kelltom/OSRS-Bot-COLOR/wiki) for tutorials, an ## User Interface OSBC offers a clean interface for configuring, running, and monitoring your Python bots. For developers, this means that all you need to do is write a bot's logic loop, and *the UI is already built for you*. -![intro_demo](https://user-images.githubusercontent.com/44652363/197059102-27a9a942-25b6-4012-b83b-90ae8399b4e8.gif) +![intro_demo](documentation/media/intro_demo.gif) ### Script Log The Script Log provides a clean and simple way to track your bot's progress. No more command line clutter! @@ -75,43 +65,25 @@ def create_options(self): self.options_builder.add_dropdown_option("menu_example", "Menu Example", ["A", "B", "C"]) ``` -![options_menu](https://user-images.githubusercontent.com/44652363/206808756-aac29140-e41d-4b6c-9f26-dc08ce0662b9.png) - -## RuneLite Launcher -In one click, you can launch RuneLite with pre-configured, *legal* plugins that allow OSBC to work its magic. This works completely separate from your normal RuneLite installation, so your personal configuration is not affected. - -![rl launcher](https://user-images.githubusercontent.com/44652363/206948553-608d0337-862c-41ca-b2e1-7cd473838060.gif) - -## Any Client Size, Anywhere -Your scripts will work no matter the size or position of the game client. OSBC locates important UI elements and allows you to access them by name. - -![resize support](https://user-images.githubusercontent.com/44652363/206949051-16e1bf57-a189-4eda-bbb2-1864e2849c45.gif) - ## Human-like Mouse Movement OSBC uses Bezier curves to create smooth, human-like mouse movements. -![mouse movements](https://user-images.githubusercontent.com/44652363/206948347-88e6296c-a5bf-43d4-a491-4680467ada31.gif) - -## RuneLite Leverage -### Object Detection -Official RuneLite plugins exist to add quality of life to players. Many plugins offer highlighting/outlining of in-game objects with solid colors, making them easier for players to see them. Using color isolation, OSBC can quickly locate these outlined objects and extract their properties into simple data structures. - -![RL object](https://user-images.githubusercontent.com/44652363/206809467-8cdefa01-235d-441f-b563-69773a2badb8.png) - -### API -There are some RuneLite plugins that expose game data to a localhost API endpoint. You can leverage this data to provide a more robust botting experience without the risks associated with modifying the game client's code. See the [API utility folder](src/utilities/api/) for more. +## Object Detection +Using color isolation, OSBC can quickly locate objects/NPCs outlined by solid colors and extract their properties into simple data structures. ## Random Click Distribution -With the help of the OSBC community, we've created a randomization algorithm that distributes clicks in a way that is more human-like. We followed the same principles used by individuals who've beat the system and achieved max levels without lifting a finger. - -![click dist](https://user-images.githubusercontent.com/44652363/206948686-89cb0c30-8626-4aa2-9415-f2f985c80cbc.gif) +With the help of the OSBC community, we've created a randomization algorithm that distributes clicks in a way that is more human-like. ## Efficient Image Searching -Sometimes, your bot might need to find a specific image on screen. We've modified OpenCV's template matching algorithm to be more efficient and reliable with RuneScape UI elements and sprites - even supporting images with transparency. That means you can search images directly from the OSRS Wiki. - -![shark](https://user-images.githubusercontent.com/44652363/206808973-8bea1717-c227-43cf-b8af-6825316eb95d.png) +Sometimes, your bot might need to find a specific image on screen. We've modified OpenCV's template matching algorithm to be more efficient and reliable with UI elements and sprites - even supporting images with transparency. ## Lightning Fast Optical Character Recognition We've ditched machine learned OCR in favor of a much faster and more reliable custom implementation. OSBC can locate text on screen in as little as **2 milliseconds**. That's **0.002 seconds**. -![ocr](https://user-images.githubusercontent.com/44652363/206808982-16f58a50-4709-4c27-9fc2-94b0c4edab21.png) +--- + +

+ + Buy Me A Coffee + +

diff --git a/documentation/media/github_social_banner.png b/documentation/media/github_social_banner.png deleted file mode 100644 index 3a8a5d99..00000000 Binary files a/documentation/media/github_social_banner.png and /dev/null differ diff --git a/documentation/media/github_social_banner.psd b/documentation/media/github_social_banner.psd deleted file mode 100644 index a3a59e6c..00000000 Binary files a/documentation/media/github_social_banner.psd and /dev/null differ diff --git a/documentation/media/intro_demo.gif b/documentation/media/intro_demo.gif index 157cce99..92610940 100644 Binary files a/documentation/media/intro_demo.gif and b/documentation/media/intro_demo.gif differ diff --git a/documentation/media/logo.png b/documentation/media/logo.png index 5216656c..6eb87dd8 100644 Binary files a/documentation/media/logo.png and b/documentation/media/logo.png differ diff --git a/documentation/media/logo.psd b/documentation/media/logo.psd index 4f7f4b50..afa36a3b 100644 Binary files a/documentation/media/logo.psd and b/documentation/media/logo.psd differ diff --git a/documentation/media/logo_alt_colors.psd b/documentation/media/logo_alt_colors.psd deleted file mode 100644 index 38306130..00000000 Binary files a/documentation/media/logo_alt_colors.psd and /dev/null differ diff --git a/documentation/media/logo_alt_colors_large.png b/documentation/media/logo_alt_colors_large.png deleted file mode 100644 index 1d77aee5..00000000 Binary files a/documentation/media/logo_alt_colors_large.png and /dev/null differ diff --git a/documentation/media/logo_alt_colors_large.psd b/documentation/media/logo_alt_colors_large.psd deleted file mode 100644 index 4fe1c5a0..00000000 Binary files a/documentation/media/logo_alt_colors_large.psd and /dev/null differ diff --git a/documentation/media/logo_large.png b/documentation/media/logo_large.png new file mode 100644 index 00000000..389e39d7 Binary files /dev/null and b/documentation/media/logo_large.png differ diff --git a/documentation/media/logo_large.psd b/documentation/media/logo_large.psd new file mode 100644 index 00000000..a9df5dd9 Binary files /dev/null and b/documentation/media/logo_large.psd differ diff --git a/documentation/media/logo_old.png b/documentation/media/logo_old.png deleted file mode 100644 index dbce6625..00000000 Binary files a/documentation/media/logo_old.png and /dev/null differ diff --git a/documentation/media/options_menu.png b/documentation/media/options_menu.png index 43e81863..ce3141f6 100644 Binary files a/documentation/media/options_menu.png and b/documentation/media/options_menu.png differ diff --git a/documentation/references.docx b/documentation/references.docx deleted file mode 100644 index 3cdd4cfc..00000000 Binary files a/documentation/references.docx and /dev/null differ diff --git a/src/OSBC.py b/src/OSBC.py index a965b51d..3f647531 100644 --- a/src/OSBC.py +++ b/src/OSBC.py @@ -40,7 +40,7 @@ def __init__(self, test: bool = False): self.build_ui() def build_ui(self): # sourcery skip: merge-list-append, move-assign-in-block - self.title("OSRS Bot COLOR") + self.title("OS Bot COLOR") self.geometry(f"{App.WIDTH}x{App.HEIGHT}") self.update() self.minsize(self.winfo_width(), self.winfo_height()) diff --git a/src/images/bot/run_off.png b/src/images/bot/run_off.png deleted file mode 100644 index 4b9e9438..00000000 Binary files a/src/images/bot/run_off.png and /dev/null differ diff --git a/src/images/bot/run_on.png b/src/images/bot/run_on.png deleted file mode 100644 index a49196c7..00000000 Binary files a/src/images/bot/run_on.png and /dev/null differ diff --git a/src/images/ui/logo.png b/src/images/ui/logo.png index 5216656c..6eb87dd8 100644 Binary files a/src/images/ui/logo.png and b/src/images/ui/logo.png differ diff --git a/src/model/bot.py b/src/model/bot.py index 48190351..410233aa 100644 --- a/src/model/bot.py +++ b/src/model/bot.py @@ -578,7 +578,7 @@ def select_combat_style(self, combat_style: str): def toggle_run(self, toggle_on: bool): """ - Toggles run. Assumes client window is configured. + Toggles run. Assumes client window is configured. Images not included. Args: toggle_on: True to turn on, False to turn off. """ diff --git a/src/model/osrs/combat/combat.py b/src/model/osrs/combat/combat.py index f8bb0c9c..56bbdce8 100644 --- a/src/model/osrs/combat/combat.py +++ b/src/model/osrs/combat/combat.py @@ -14,10 +14,7 @@ class OSRSCombat(OSRSBot, launcher.Launchable): def __init__(self): bot_title = "Combat" - description = ( - "This bot kills NPCs. Position your character near some NPCs and highlight them. After setting this bot's options, please launch RuneLite with the" - " button on the right." - ) + description = "This bot kills NPCs. Position your character near some NPCs and highlight them.\nTHIS SCRIPT IS AN EXAMPLE, DO NOT USE LONGTERM." super().__init__(bot_title=bot_title, description=description) self.running_time: int = 1 self.loot_items: str = "" diff --git a/src/model/osrs/osrs_bot.py b/src/model/osrs/osrs_bot.py index cdd56e85..29f2b53d 100644 --- a/src/model/osrs/osrs_bot.py +++ b/src/model/osrs/osrs_bot.py @@ -1,11 +1,3 @@ -""" -The OSRS Bot class is the base class for all OSRS bots. It inherits from the RuneLiteBot class, which -pretty much provides all of the functionality for OSRS bots as it is. The only thing this class is doing, -is setting the game title to "OSRS". Now, when you create a new bot for Old School Runescape, you can -simply inherit from this class instead of the RuneLiteBot class and not have to worry about setting -the game title. This is just a convenience class in this case, but for private servers, this is where you'd -implement any custom functionality that is specific to the private server you're writing a bot for. -""" from abc import ABCMeta from model.runelite_bot import RuneLiteBot, RuneLiteWindow diff --git a/src/model/osrs/template.py b/src/model/osrs/template.py index 4d0fef0b..1c4c66a3 100644 --- a/src/model/osrs/template.py +++ b/src/model/osrs/template.py @@ -10,10 +10,10 @@ class OSRSTemplate(OSRSBot): def __init__(self): - bot_title = "" - description = "" + bot_title = "