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.

Scripting help

Featured Replies

first of all im using IntellJ

Im trying to use my main script to call, to a second script to keep it more clean / less code to go through

I've tried mulitpul ways and i always find myself with errors
my current error will no go away after many attemps

Operator '!' cannot be applied to 'void'
Error is this piece of code where is errors is
 while (!highLevelAlch.onExit()) { 
     highLevelAlch.onLoop();



private void startSecondaryScript() {
        log("Starting Secondary Script...");
        secondaryScriptThread = new Thread(() -> {
            HighLevelAlch highLevelAlch = new HighLevelAlch(getBot());
            highLevelAlch.exchangeContext(getBot());

            try {
                highLevelAlch.onStart();
                while (!highLevelAlch.onExit()) {
                    highLevelAlch.onLoop();
                    Thread.sleep(100); // Adjust the sleep duration as needed
                }
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        });

        secondaryScriptThread.start();
    }

    public void stopSecondaryScript() {
        if (secondaryScriptThread != null && secondaryScriptThread.isAlive()) {
            secondaryScriptThread.interrupt();
        }
    }

    @Override
    public void onExit() {
        log("Exiting Ethereum Bracelet Charging Script");
        try {
            closeBank(); // Close the bank when the script exits
        } catch (InterruptedException e) {
            throw new RuntimeException(e);

        }
    }
}

Edited by DarkScuzz

  • Author

I think i figured it out
but please correct me if im wrong

i needed to add

public boolean onExit;
on my second script

and on my main i changed it to this
try {
        highLevelAlch.onStart();
        while (highLevelAlch.onExit) {
            highLevelAlch.onLoop();
            Thread.sleep(100); // Adjust the sleep duration as needed
        }
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
});

seems to be fine, no errors atm.. going to test
watch it breaks xD

 

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.