Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Questions from a beginner scripter

Featured Replies

Hello! I've always been wanting to write a bot script and recently after getting a job as a Junior Software Dev i figued why the hell not start now!

 

So basically i'm still in the process of learning a few things. However, when writing a Sheep Shearer script. It will only continue the convo with Farmer Fred if i'm running OSBOT with remote debugging enabled. 

https://pastebin.com/FLmy0qqm

 

Thanks for any replies :) 

A few things to note:

  1. As the bot is interacting with a live game, you cannot rely on API calls to execute successfully. For example, if you have the line 'entity.interact(....', and then hit some lag, the call might not affect game state and so your script will continue without actually having interacted. You have to build in resilience to this with your script. Ideally, your script should be entirely deterministic and only execute one game interaction per onLoop call.
  2. The onLoop function loops, so you will end up unnecessarily trying to walk to the area you have specified every iteration, which i'm guessing is not what you had in mind.
  3. Avoid static sleeps (e.g sleep(random(300,400));...). These don't really anything other than hinder the efficiency of your script.
  4. The interaction API handles camera movement etc, so no need to do that manually

Best of luck :)

Apa

 

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.