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.

Task based framework

Featured Replies

Hey all, long time no see. I am thinking about doing some botting but I have a problem, I lost the laptop that had my ide on it and even though I wrote my own scripts I really don't know java (those that remember me should remember I said that often).

 

Anyway, I had a "framework" that I found here on the forums and I used that as the base of my scripts. It consisted of one class that had a list of "tasks" to add to the list and the other classes were the actual tasks. The script would go through the class list and see if the "test" at the beginning of each "task" class matched the current state (if my player is in the bank and bank is not open). If it matched it would execute the code that followed, if not the script would move to the next task on the list. It worked similar to "state" scripts but many classes instead of one large one.

 

I have been told this isn't good programming practice, and I understand that. The fact of the matter is this is the only way I know how to script and it works for me.

 

Anyway, if anyone can point me in the direction of an open source script written this way I would appreciate it. I found the original one here years ago but can't seem to find one now.

 

Thanks!

Maybe look over some of the tutorials in the "Tutorials" section of "Scripting help

I'd recommend checking out @Eliot's 10 min Open-Source scripts here's one for example:

 

Also take a look @Explv's scripting tutorial here:

 

 

  • Author

I have tried following Explv's tutorial, he is a great guy and talented programmer. I don't know how to explain it, but I just don't "get" it. Something doesn't click. With the task based classes I get it a little, enough to get by anyway.

I personally split my scripts into a mix of a 'Task' / 'State' based framework. Add my Discord @ HeyImLit#3244 and I'll give you some code snippets.

  • Author
14 hours ago, Chris said:

use onloop

Yeah, I do think the main class used onstart to build the list of tasks, and onloop to go through that list and try to match the current state of the game to the state statements at the beginning of all the other classes. If it matched then it executed the code and then started the loop over again, are you aware of any tutorials for scripting in this manner?

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.