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.

Grand Exchange help

Featured Replies

I am trying to get this grand exchange script to work. However I am getting an error on line highlighted green. I am new to scripting and don't know if this is the correct way to upload the script

package core;

public class script extends org.osbot.rs07.script.Script{
    
    private final String itemName = "Clay";
    private final int itemPrice = 53;
    private final int itemAmount = 500;

    @Override
    public int onLoop() throws InterruptedException {
        GrandExchange GE = new GrandExchange(this); //new GrandExchange instance with our script
        if (!getGrandExchange().isOpen()) { //Checks if ge is open
            GE.openGE(); //open ge randomly using booth or npc
        } else {
            GE.collectItems(false); //collect items (boolean true -> to bank, false -> inventory)
            GE.createBuyOffer(itemName, itemPrice, itemAmount); //creates a buy offer with specified params
            GE.createSellOffer(itemName, itemPrice, 0); //Sells all of the specified items in inventory at specified price ( 0 = all, int = specified amount)
        }
        return 150;
    }

}
 

You dont need to instantiate a new GE object. The org.osbot.rs07.script.Script class (which this class is extending) already contains an instance to a GE object. You can access it by getGrandExchange()

edit: which, by the looks of it, you are already doing in the if condition

Edited by camaro 09

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.