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.

Why would this fail?

Featured Replies

This seems to fail on Low CPU mode. It will continue to pick the bush even when the inventory contains Cadava berries.

                if (!script.inventory.contains("Cadava berries")) {
                    if (!bushArea.contains(script.myPosition())) {
                        script.getWalking().webWalk(bushArea);
                    } else {
                        Entity bush = script.getObjects().closest("Cadava bush");
                        if (bush != null) {
                            if (bush.interact("Pick-from")) {
                                Sleep.sleepUntil(() -> script.inventory.contains("Cadava berries"), 5000);
                            }
                        }
                    }
                }

If I pause the script and resume again it works as expected?

Edited by harrypotter

  • Author
2 minutes ago, IDontEvenBot said:

your bush.interact("Pick-from") is inside the Boolean of the if statement?? I dont know if that could cause it but that might be an issue.

No because it shouldn't be passing the very first if statement after the first loop.

The bot will pick the berries, however on the next loop the first if statement continues to return false

 

27 minutes ago, harrypotter said:

No because it shouldn't be passing the very first if statement after the first loop.

The bot will pick the berries, however on the next loop the first if statement continues to return false

 

Might be possible if Inventory is not the currently open tab, then you wont register as having the berries in inv when you check inventory??? Or the game doesn't  update quick enough on low CPU mode and your code checks before the inv has updated?

Edited by IDontEvenBot

add a check for ur inv being full

  • Author
7 hours ago, IHB said:

add a check for ur inv being full

My inv isn't full though, the steps before this point ensures that.

Regardless this wouldn't fix the issue.

2 hours ago, harrypotter said:

My inv isn't full though, the steps before this point ensures that.

Regardless this wouldn't fix the issue.

We need more code than what youve given to know what you're doing

  • Author
5 minutes ago, IHB said:

We need more code than what youve given to know what you're doing

Not really, the most important thing here is that my inventory does contain the berries, yet this snippet executes. Surrounding code is irrelevant.

I submitted a bug report about inventory needing to be open in order to view items. If they don't fix it that breaks all scripts that use tabs other than inventory and use any item checking for script logic. So all of them :doge:

6 hours ago, Stimpack said:

how many times does it repeat after inventory already contains berries?

Idk but on my tut island script it will mine entire inventory of ore and won't register as having one until the tab is opened. 

  • Author
7 hours ago, Stimpack said:

how many times does it repeat after inventory already contains berries?

 

Indefinitely until I pause then resume

23 minutes ago, harrypotter said:

 

Indefinitely until I pause then resume

try getInventory().getItemInSlot of cadava berries then check the name of it, maybe there's weird formatting? idk.

could also open your inventory then picking from bush, as suggested above.

 

really strange :( based on code, it shouldn't be doing that..

7 hours ago, Juggles said:

Inventory is already checked when it's not open. Something is wrong in your script 

Really because I'm sitting here watching a blank script with inventory.getAmount returning zero with the item in inventory.. 

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.