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.

Is there a way to seperate breakhandler from random events?

Featured Replies

Hi.

 

My script uses dwarf cannon and I have to make it pick up the cannon when the "pause" method is called so that it doesn't dissapear during breaks.

The only problem is that the pause method is also called by regular random events, causing the cannon to have to be picked-up and replaced many times an hour.

 

So my question is as the title suggests. Is there anyway to seperate the client's breakhandler from regular random events?

Perhaps there is a different method then "pause", something like "onBreak"?

I've tried looking in the API but it seems that they're both using the same abstract main interface class.

 

Thanks!

 

Edited by swiffyp

Hi.

 

My script uses dwarf cannon and I have to make it pick up the cannon when the "pause" method is called so that it doesn't dissapear during breaks.

The only problem is that the pause method is also called by regular random events, causing the cannon to have to be picked-up and replaced many times an hour.

 

So my question is as the title suggests. Is there anyway to seperate the client's breakhandler from regular random events?

Perhaps there is a different method then "pause", something like "onBreak"?

I've tried looking in the API but it seems that they're both using the same abstract main interface class.

 

Thanks!

 

You could try doing something like this:

@ Override
public void pause() {
    if (getBot().getRandomExecutor().getTimeUntilBreak() == 0) {
        pickUpCannon();
    }
}

 

You could try doing something like this:

@ Override
public void pause() {
    if (getBot().getRandomExecutor().getTimeUntilBreak() == 0) {
        pickUpCannon();
    }
}

 

This ^ Also good to mention getTimeUntilBreak() returns the time in minutes

 

OR you can write your own break manager with -allow norandoms

  • Author

 

You could try doing something like this:

@ Override
public void pause() {
    if (getBot().getRandomExecutor().getTimeUntilBreak() == 0) {
        pickUpCannon();
    }
}

Will test this when I get home, thanks a bunch pal!

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.