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.

setRunning Problems

Featured Replies

I'm trying to get setRunning to work. I've set up the method to return true and I'm passing it a false parameter.

public boolean setRunning(boolean run)
{
     return true;
}

public psuedoLoop()
{
    setRunning(false);
}

I'm sure I'm doing something wrong. I'm trying to set run off and I've tried all combinations of true and false returns and parameters.

What are you trying to do? Right now, you aren't actually setting anything. Although you pass the method "false", you do not do anything with the value inside of the setRunning method. Do you have a "running" field variable that you want to adjust through the setRunning method?

  • Author

I want to set running on while my bot loots items and set it off during trips to and from the bank. I'm still unfamiliar with a lot of the OSBot API so I have no clue what to do with the setRunning method.

Is there any way to directly manipulate isRunning or is setRunning the only way to go about toggling run on/off?

This really has nothing to do with the OSBot API. Unless you Override a method (which you cannot for this), you have to use setRunning as it comes from the API (settings.setRunning(boolean)).

I'm trying to get setRunning to work. I've set up the method to return true and I'm passing it a false parameter.

public boolean setRunning(boolean run)
{
     return true;
}

public psuedoLoop()
{
    setRunning(false);
}

I'm sure I'm doing something wrong. I'm trying to set run off and I've tried all combinations of true and false returns and parameters.

 

 

well returning true turns it on soo

  • Author

This really has nothing to do with the OSBot API. Unless you Override a method (which you cannot for this), you have to use setRunning as it comes from the API (settings.setRunning(boolean)).

 

I wasn't aware that setRunning was an extension of the settings class. Thank you!

 

well returning true turns it on soo

 

What?

 

no :o the method at the top does nothing at all. If you really wanted your own utility which it seems this guy was trying to do, you would do something like

 

private boolean turnRun(boolean on) {

return settings.setRunning(on);

}

 

Unless I misunderstood your post? xd

 

apa

I wasn't aware that setRunning was an extension of the settings class. Thank you!

 

 

 

http://osbot.org/api/org/osbot/rs07/api/Settings.html#setRunning-boolean-

 

gl

  • Author

Another quick question: does localWalker automatically set on run if energy is above a certain percentage? If so, how do I disable this or circumvent it?

Another quick question: does localWalker automatically set on run if energy is above a certain percentage? If so, how do I disable this or circumvent it?

 

It does not, you have to handle running yourself

It does not, you have to handle running yourself

 

Tom is not correct. LocalWalker handles run because it calls WalkEvent. If you want you can construct your own walk event and set the parameters to disable or enable toggling run. There is also an option to set the threshold in the event.

Tom is not correct. LocalWalker handles run because it calls WalkEvent. If you want you can construct your own walk event and set the parameters to disable or enable toggling run. There is also an option to set the threshold in the event.

 

I think you're speaking a bit too technically for OP

well returning true turns it on soo

Noob lol

The method above will always return true.

  • Author

Tom is not correct. LocalWalker handles run because it calls WalkEvent. If you want you can construct your own walk event and set the parameters to disable or enable toggling run. There is also an option to set the threshold in the event.

 

I'll look into making my own walking event since local walker doesn't really do much of what I want it to do. Error checking whether or not my bot has arrived at a position is a pain with local walker as far as I know.

 

http://osbot.org/api/org/osbot/rs07/event/WalkingEvent.html - This is all I've got to work with for creating a new walking event, right?

I'll look into making my own walking event since local walker doesn't really do much of what I want it to do. Error checking whether or not my bot has arrived at a position is a pain with local walker as far as I know.

 

http://osbot.org/api/org/osbot/rs07/event/WalkingEvent.html - This is all I've got to work with for creating a new walking event, right?

Ye, for example:

 

WalkingEvent e = new WalkingEvent(new Position(0,0,0));
e.setEnergyThreshold(100);
boolean ret = bot.getEventExecutor().execute(e).hasFinished();

I'm not sure why every setter is chainable except setEnergyThreshold sad.png

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.