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.

null

Featured Replies

I have been getting an NPE with two of my scripts that used to work fine.

[ERROR][Bot #1][10/03 02:06:30 PM]: Error in script executor!
java.lang.IllegalStateException: Bank tab count calculation failed!
    at org.osbot.rs07.api.Bank.getItemCountForTab(jo:219)
    at org.osbot.rs07.api.Bank.getItemsInTab(jo:214)
    at org.osbot.rs07.api.Bank.iiIiiiiiiIIi(jo:782)
    at org.osbot.rs07.api.Bank.IIiIIiiIIIiI(jo:853)
    at org.osbot.rs07.api.Bank.iIIIiiiIIIii(jo:1136)
    at org.osbot.rs07.api.Bank.withdraw(jo:1400)
    at org.osbot.rs07.api.Bank.withdraw(jo:1217)
    at org.osbot.rs07.api.Bank.withdraw(jo:1125)
    at EmeraldRings.EmeraldRings.onLoop(EmeraldRings.java:367)
    at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(ro:134)
    at java.lang.Thread.run(Unknown Source)

 

line 367 says 

getBank().withdraw("Emerald", 13);

 

the whole method:

        if (getBank().isOpen())
                if (getBank().contains("Gold bar")) {
                    getBank().withdraw("Gold bar", 13);
                
                    new ConditionalSleep(5000) {
                        @Override
                        public boolean condition() throws InterruptedException {
                            return getInventory().contains("Gold bar");
                        }
                    }.sleep();
                    if (getBank().isOpen() && getBank().contains("Emerald")) {
LINE 367           getBank().withdraw("Emerald", 13);
                        new ConditionalSleep(5000) {
                            @Override
                            public boolean condition() throws InterruptedException {
                                return getInventory().contains("Emerald");
                            }
                        }.sleep();
                        if (getBank().isOpen() && getBank().contains("Ring mould")) {
                            getBank().withdraw("Ring mould", 1);
                            new ConditionalSleep(5000) {
                                @Override
                                public boolean condition() throws InterruptedException {
                                    return getInventory().contains("Ring mould");
                                }
                            }.sleep();
                        }

                    }
                }

 

if i run the script without breaks I never get the NPE, however, when I use breaks after the bot comes back from break it gets this NPE.

help is appreciated. 

Edited by sp3cpk

Perhaps try checking the amount in the bank instead of contains()?

  • Author

I tried checking the amount in the bank. The error still happens. Again, this only occurs after the bot comes back from break. Sometimes I get an error with the script executor. 

Maybe try putting the items in the main first tab, it seems like the error is coming from trying to grab the amount in a specific tab.

  • Author
8 hours ago, d0zza said:

Maybe try putting the items in the main first tab, it seems like the error is coming from trying to grab the amount in a specific tab.

The items are in the main tab x.x

Still getting this error

[ERROR][Bot #1][10/05 07:46:56 PM]: Error executing event : org.osbot.rs07.event.InteractionEvent@2cde43af
java.lang.NullPointerException
[ERROR][Bot #1][10/05 07:46:56 PM]: Error in script executor!
java.lang.IllegalStateException: Bank tab count calculation failed!
    at org.osbot.rs07.api.Bank.getItemCountForTab(jo:219)
    at org.osbot.rs07.api.Bank.getItemsInTab(jo:214)
    at org.osbot.rs07.api.Bank.iiIiiiiiiIIi(jo:782)
    at org.osbot.rs07.api.Bank.IIiIIiiIIIiI(jo:853)
    at org.osbot.rs07.api.Bank.iIIIiiiIIIii(jo:1136)
    at org.osbot.rs07.api.Bank.withdraw(jo:1400)
    at org.osbot.rs07.api.Bank.withdraw(jo:1217)
    at org.osbot.rs07.api.Bank.withdraw(jo:1125)
    at CookPizzaAIO.CookPizzaAIO.onLoop(CookPizzaAIO.java:1218)
    at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(ro:134)
    at java.lang.Thread.run(Unknown Source)

 

22 minutes ago, sp3cpk said:

The items are in the main tab x.x

Still getting this error

[ERROR][Bot #1][10/05 07:46:56 PM]: Error executing event : org.osbot.rs07.event.InteractionEvent@2cde43af
java.lang.NullPointerException
[ERROR][Bot #1][10/05 07:46:56 PM]: Error in script executor!
java.lang.IllegalStateException: Bank tab count calculation failed!
    at org.osbot.rs07.api.Bank.getItemCountForTab(jo:219)
    at org.osbot.rs07.api.Bank.getItemsInTab(jo:214)
    at org.osbot.rs07.api.Bank.iiIiiiiiiIIi(jo:782)
    at org.osbot.rs07.api.Bank.IIiIIiiIIIiI(jo:853)
    at org.osbot.rs07.api.Bank.iIIIiiiIIIii(jo:1136)
    at org.osbot.rs07.api.Bank.withdraw(jo:1400)
    at org.osbot.rs07.api.Bank.withdraw(jo:1217)
    at org.osbot.rs07.api.Bank.withdraw(jo:1125)
    at CookPizzaAIO.CookPizzaAIO.onLoop(CookPizzaAIO.java:1218)
    at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(ro:134)
    at java.lang.Thread.run(Unknown Source)

 

Honestly at this point I'd probably just try re write the script, no scripts that I'm using at the moment are experiencing an issue like that.

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.