Giter Club home page Giter Club logo

osrs_basic_botting_functions's Introduction

Old School Botting Functions

Full tutorial on creating Functions for automation using Python for osrs botting. The example used will be woodcutting, where the script will use colour detection using opencv and use pyautogui to move the mouse, click and use the keyboard to drop items using an image recognition module that will detect the wood icons in the inventory.

Consider donating if you found the project fun and learnt more about python: https://www.buymeacoffee.com/slyautomatG

Other python files will also use tesseract-OCR to detect text within images using tesseract-OCR image to text recognition functions.

Need help with installing python, pycharm and cloning a repo? read this article for help: https://www.slyautomation.com/blog/install-pycharm-and-python-clone-a-github-project/

Setup

Note: PC Monitor settings - change resolution to 1920x1080 panel and text of apps was set to 100%.

Right click and select Display Settings

image

In the Scale And Layout section - Change size of text to 100% and Set Display Resolution to 1920 x 1080 for best results.

image

Installing Pycharm

pycharm

pycharm windows

How to Install Pycharm

How to add Project with Pycharm

Editing how to ensure venv (virtual environment) is active

core.py and function.py

For the full video tutorial click link: https://www.youtube.com/watch?v=C7ZY4KYpFII

This video is more about how it was created at the start core.py is how to make the python script focus on the old school runescape application and adjust the window size so all the scripts run as intended. Then functions.py is where all the different kinds of shortcut functions are placed to reference the mini map, or a piece of code to do color detection or open the inventory.

Quick module install Steps

in terminal type:

pip install -r requirements.txt

tesseract-ocr = https://digi.bib.uni-mannheim.de/tesseract/?C=M;O=D

if that website is down use 5.3: https://drive.google.com/file/d/1acZJSm3BEmCORSB4NDmpaaT5WC1FNu2s/view?usp=sharing

or use original version 3.0.2: https://drive.google.com/file/d/1mCgYueVKRVbPg-ICz8BjrAWH5oOLjp55/view?usp=sharing

Tutorial on installing tesseract-OCR: https://youtube.com/watch?v=X3snnwzJfEw&t=25m15s

Runelite Setup

Tutorial on runelite setup click link: https://youtube.com/watch?v=JO2FvkJwppA

Also make sure that the transparent side panels and chatbox is unchecked:

image

Make sure the tool bar is enabled and showing on the right had side of the client window (press the arrow to enable the toolbar as visable):

image

pybot-config.yaml (configuration file)

image

client_title: Is the title of the application window usually Runelite if you have completed the steps for the Runelite Setup, if not then enter RuneLite - username or OpenOSRS

image

image

To disable the username in the client window using the toolbar search for runelite plugin and in the settings make sure 'Show display name title' is unchecked.

image

enable_on_start: if you don't want the config window to pop up each time, enter as false

file_path_to_client: the head folder where the OSRS client is stored usually .runelite or .openosrs

pc_profile: is the user profile of the pc so it can find runelite or openosrs

image

tesseract_path: Is the folder address to tesseract-ocr program

image

- Note: copy the format below make sure to include the slashes (\).

image

In Runescape setting, set the following:

  • Ideally under display, enable hide roofs, camera zoom, screen brightness matching below.

image

  • Under controls, enable shift click to drop items, and set inventory shortcut to ESC keystroke.

image

  • Under Interfaces ensure Game Client layout is Resizable - Modern Layout
  • Show data orbs enabled

image

Make sure the info boxes are filled and the standard brown color, use the toolbar and search Runelite. In the settings under overlay section select the 'Overlay color'.

Change Interface font to 'Bold'. Change Infobox font to 'Bold'. Change opacity to 255 and the hex color to #FF463D32:

image

Woodcutting

features

Cuts woods and makes fire

  • Use object marker plugin to highlight trees red, green or yellow.

  • Make sure to have an axe equipped and a tinderbox if firemaking.

  • Turn on woodcutting plugin

  • Turn off Show weight in item stats Tutorial on firemaking code click link: https://youtu.be/bHZCQUChG_k

image

  • Pick a object marker color, a wood type and how long in hours to run for

image

fishing.py

mining.py

  • Turn on mining plugin.
  • Mark ore spots using the object marker to green.

image

  • Make sure to equip a pick axe.

  • enter the ore type, the marker color and how long to run in hours (Change Run_Duration_hours) image

image

Tutorial on mining code click link: https://youtube.com/watch?v=dkD5gXcgQYI

combat.py

  • Turn on NPC Indicators plugin and Opponent Information plugin
  • Change Highlight colour to #ff00ffff

image

  • Hold Shift and Right Click on NPC/Mob and select Tag-All

image

  • In the Combat script change the first value to the NPC/Mob name
  • Change Run_duraction_hours to the number of hours to run script for

image

  • To add or use a NPC/Mob not on the list add it to the monster_array as ['each iteration captured by the combat_text'] and add to monster_list the name

image

Tutorial on combat code click link: https://youtube.com/watch?v=llGbhVfU1Bc

thieving.py

steal_man() Works with Knights, Goblins and Thieves etc.

  • Turn on NPC Indicators plugin
  • Change Highlight colour to #ff00ffff
  • Hold Shift and Right Click on NPC/Mob and select Tag etc.

image

  • Make sure pickpocket will be actioned on left click (some npcs even on always right click have 'talk to' as left click option)

image

  • To stop script hold down the capslock key

Improvements to add

  • Stop or eat when health is low (warning this does not stop when health is low)

steal_tea()

  • Hold shift and mark object Tea Stall (Make sure the color is red)

image

image

Clay Money Maker

This only works at the Rimmington mine and banks at Port Sarim deposit box.

  • Turn on mining plugin.
  • Make sure to equip a pick axe.
  • The Start location when running the clay_beginner_money_maker.py is at the Rimmington Mine start next to the clay deposits

image

- IMPORTANT! Set compass directly north, click the on the compass to reset straight. 
 Otherwise the walker from deposit box to rimmington mine won't work.

image

  • Mark clay spots next to the east fence line using the object marker to green (optional are red or amber).

image

image

  • Mark the deposit box at Port Sarim using the object marker to red.

image

This is the path that is takes:

image

Make sure to select the color that you highlighted the clay ores and set the Run Duration to the number of hours:

image

smithing.py

Tutorial on smithing code click link: https://youtube.com/watch?v=YezEeVjoP6o

magic.py

features

High alching

Superheat item

Tutorial on magic code click link: https://youtube.com/watch?v=Vyhy2CpfK7I

osrs_walker.py

Tutorial: TBA

  • Located in jar_files: Add httpplug-1.0.3.jar to C:\Users\ .openosrs \plugins

  • Located in jar_files: Add shortestagility-5.0.2.jar to C:\Users\ .openosrs \plugins

    image

Setup

  • Create txt file on desktop paths.txt, the modified plugin shortestagility-5.0.2.jar saves the coordinates when a path target is made in osrs.

  • image

  • image

  • image

  • Use main map and right click then select 'set target', run server.py and then run osrs_walker.py.

  • ezgif com-gif-maker (1)

Troubleshooting

python venv/Scripts/pywin32_postinstall.py -install

Wiki

Wiki page on function descriptions and purpose

Using the top banner in pycharm under file goto setttings. image

Then in settings under the tools section click on terminal. and you'll need to change the shell path to cmd.exe. at the moment your default terminal is powershell Image image

You'll now be able to type in the pip command no issues

osrs_basic_botting_functions's People

Contributors

slyautomation avatar terpypy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

osrs_basic_botting_functions's Issues

Question: Windows Setup - core.py Win32gui

New python user trying to set this up for a few days now. I pulled with pycharm per the docs and I'm trying to run just core.py, thinking its a good starting point to start understanding, and am getting the following error: No module named 'win32gui'

I have tried a pip install command which fails, as well as file/setting/python interpreter to install the win32gui package which both result in a similar error: Getting requirements to build wheel ... error

Wanted to check if there is something obvious I'm missing to set it up, or if a new package has replaced it.

Question: Mac compatible?

I noticed one of the requirements is pywin32 installed. Does this mean this would only work on windows? Or is there a workaround for mac?

Woodcutting

I tried the woodcutting and woodcutting and firemaking at varrok, but after maybe 10-15minutes it will click the membership icon on the minimap and go to the webpage and basically break because runelite is no longer the main window

Question: Linux compatible?

I am having trouble using your code because of the win32gui requirement. I cannot install it on my system because of: ModuleNotFoundError: No module named 'winreg'

Woodcutting Bank

Woodcutting bank Draynor,
Cant find bankers with Color tagged.

resizeImage()

First off i love this project and want to help contribute.

But im having some trouble on initial setup.

my resizeImage() is giving me a window that is not on the text at all it seems to be down and to the right for some reason.
"""
I had al sorts of alignment issues with image captures across many .pys and functions.

Parts of systems works, E.g. Could detect trees Harvest, then be stuck clicking forever after full.
Found out windows had a zoom setting as i was checking pixel placement on the screen.
Changed the "size of text, apps, and other items" : %100

"""

[WinError 5] Access is denied

Traceback (most recent call last):
  File "G:\Games\OSRSHelp\osrs_basic_functions-main\cooking.py", line 518, in <module>
    barb_village_powercook_and_fish(Run_Duration_hours=6, invent_full=24)
  File "G:\Games\OSRSHelp\osrs_basic_functions-main\cooking.py", line 451, in barb_village_powercook_and_fish
    fishing_text = Image_to_Text('thresh', 'textshot.png')
  File "G:\Games\OSRSHelp\osrs_basic_functions-main\functions.py", line 203, in Image_to_Text
    text = pytesseract.image_to_string(im, config=parse_config)
  File "G:\Games\OSRSHelp\osrs_basic_functions-main\venv\lib\site-packages\pytesseract\pytesseract.py", line 423, in image_to_string
    return {
  File "G:\Games\OSRSHelp\osrs_basic_functions-main\venv\lib\site-packages\pytesseract\pytesseract.py", line 426, in <lambda>
    Output.STRING: lambda: run_and_get_output(*args),
  File "G:\Games\OSRSHelp\osrs_basic_functions-main\venv\lib\site-packages\pytesseract\pytesseract.py", line 288, in run_and_get_output
    run_tesseract(**kwargs)
  File "G:\Games\OSRSHelp\osrs_basic_functions-main\venv\lib\site-packages\pytesseract\pytesseract.py", line 255, in run_tesseract
    proc = subprocess.Popen(cmd_args, **subprocess_args())
  File "C:\Users\Chris\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\Chris\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
PermissionError: [WinError 5] Access is denied

Process finished with exit code 1

All scripts end in this issue. It's probably my fault, but is there any more information you need to solve this?

Barbarian Fishing Fish not added. Fishing in general is broken.

Let me grab the barbarian fishing screenshots for you. Would you mind adding them to the image pool so the fishing script works with them?
ltrout_fish
lsalmon_fish
lsturgeon_fish

The count also seems to be wonky, even for normal fish.

How exactly am I supposed to be starting the fishing script, just to make sure I'm not making any mistakes here?

Mobile OCR

Hey mate, I'd like to work with you on making with Mobile compatible, and using a sale & licensing variation to market this.

We can write good scripts and not over sell this.

I'm a web dev so we can make this work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.