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.

Trouble with Widgets

Featured Replies

  • Author
6 hours ago, Apaec said:

If you're finding bits of your code are interfering with other parts and it's taking you such a long time to debug, perhaps consider the structure of your code? I don't know what your task class does which you're extending with this code, but if it's just some abstract class with those methods that you're overriding, then that seems pretty useless -why not just have your code in your onLoop where you can see it all at once ^^! 

I feel like onLoop on bigger scripts is not my thing. I can't stand looking at bunch of code glued together under 1 loop :feels: I'll end up with 3k lines of coding in one class

7 hours ago, HeyImJamie said:

Don't you then end up with scripts like the 3k lines tut that existed somewhere on here :feels: 

 

5 hours ago, Eliot said:

Please don't encourage this (especially for non-trivial scripts). Having a gigantic onLoop would not make this easier to debug, but quite the contrary. The problem in this case is debugging skills and without them, regardless of structure, you will run into these problems.

 

4 hours ago, Visty said:

I feel like onLoop on bigger scripts is not my thing. I can't stand looking at bunch of code glued together under 1 loop :feels: I'll end up with 3k lines of coding in one class

Sorry I think I didn't explain myself correctly! You're right in saying that big on loops are bad, but I find the best way to manage that is to delegate script function to subclasses each with their own purpose, that way for larger and especially AIO scripts, your onLoop would be no more than 10 or 20 lines. For big scripts, breaking the code up is a must, I just don't think that a 'task' or 'node' (or whatever name you want to call it) framework is the best way and often there are much neater design patterns which fulfil a more object-oriented style! (: 

Apa

  • Author
1 hour ago, Apaec said:

 

 

Sorry I think I didn't explain myself correctly! You're right in saying that big on loops are bad, but I find the best way to manage that is to delegate script function to subclasses each with their own purpose, that way for larger and especially AIO scripts, your onLoop would be no more than 10 or 20 lines. For big scripts, breaking the code up is a must, I just don't think that a 'task' or 'node' (or whatever name you want to call it) framework is the best way and often there are much neater design patterns which fulfil a more object-oriented style! (: 

Apa

True that, I've made multiple scripts by using onLoop, by seperating the functions into subclasses, but felt like somewhat Tasks were easier to maintain. However, I'll give it a try for my next project, and see how it goes, wouldn't hurt I guess :)

Since when was good code formatting a thing on these forums

Edited by Tom

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.