Skip 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.

Interaction fails?

Featured Replies

                if (!getMagic().isSpellSelected()) {
                    if (getMagic().castSpell(NormalSpells.SUPERHEAT_ITEM)) {
                        new ConditionalSleep(5000) {
                            @Override
                            public boolean condition() throws InterruptedException {
                                return getMagic().isSpellSelected();
                            }
                        }.sleep();
                    }
                } else {
                    long invAmount = getInventory().getAmount("Iron ore");
                    if (getInventory().interact("Cast", "Iron ore")) {
                        new ConditionalSleep(5000) {
                            @Override
                            public boolean condition() throws InterruptedException {
                                return invAmount != getInventory().getAmount("Iron ore");
                            }
                        }.sleep();
                    }
                }

 

I have the above in a script and the interaction occasionally fails. The script will cast a few hundred casts and eventually fail and I am not too sure why.

The script will go on its way and then after a few hundred casts just stops. The spell is selected and the bot is stuck in the inventory hovering the iron ore to interact with it.

Is this an API bug or have I possibly done something that isn't reliable?

 

Just put a log in the code blocks (each one) and when it gets stuck hovering over the iron ore, you will know where the script is hanging. You might find that it isn't hanging anywhere here and the issue is somewhere else in your code.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.