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.

[HELP] Making script go task to task instead of looping over first two

Featured Replies

  • Author
24 minutes ago, ItPoke said:

I just told you to clean the code so you can make sure that you have your brackets correct....
 


if (widget == null || !widget.interact()) {
    return;
  } // <- Why is there a curly bracket here?!
}

 

I've back tracked and started going back through cleaning things up was just wondering why I get "Multiple markers at this line
    - widget cannot be resolved to a 
     variable"  
When I add: 

if (widget == null || !widget.interact()) {

 Like I said I'm really new to this so if this is a stupid question I apologize in advanced lol just eager to learn and appreciate you taking the time to look at this. 

 

you-da-real-mvp.jpg

  • Author
5 hours ago, Mr_MilkysButler said:

Can you provide your log?

[ERROR][Bot #1][02/02 10:27:58 PM]: Error in bot executor or from Error class (and not Exception)!
java.lang.Error: Unresolved compilation problems: 
    widget cannot be resolved to a variable
    widget cannot be resolved
    removeMenu cannot be resolved to a variable
    removeMenu cannot be resolved
    The method interact() is undefined for the type Settings

    at oaklarders.Oaklarders.onLoop(Oaklarders.java:36)
    at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(sh:238)
    at java.lang.Thread.run(Unknown Source)
 

First, if you are using Intellij rebuild your project so it cleans your code.

Your problem is you are trying to use variables out of their scope.

  • Author
53 minutes ago, Mr_MilkysButler said:

First, if you are using Intellij rebuild your project so it cleans your code.

Your problem is you are trying to use variables out of their scope.

Using Eclipse 

  • Author
On 2/2/2019 at 11:22 AM, Spider Scripts said:

maybe just try to use if and else statements

so


if(has planks)
   build larders
else if(condition 2)
   remove larders
else if(condition 3)
   interact with butler

 

Gonna give this a shot. In my head this makes sense and would shorten the script down to a lot less lines and BS. The hardest one to figure out for me would be how to call butler with settings<house<call servant. Will give it a go though!

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.