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.

Problem with mining

Featured Replies

Hey,

Maybe someone could help me out with mining in OSBot? Can't figure out how to code a miner. Different rocks don't have a distinct name, so I though about hard coding ID's, but as it turns out, the ID's change. I failed to get objects (rocks) by position. Maybe it's possible to get rock objects and check if they are mined by colour/position? Any snippets regarding this will the greatly appreciated.

Since all rocks are called the same i guess you need to use the position or color as you said. Don't know how tho, i just used id's.

public enum Rock {

    CLAY(6705),

    COPPER(4645),

    TIN(53),

    //modified colours of the ore of each rock in rs

    IRON(2576),

    SILVER(74),

    COAL(10508),

    GOLD(8885),

    MITHRIL(-22239),

    ADAMANTITE(21662),

    RUNITE(-31437);

 

    public final short COLOUR;

 

    Rock(int colour) {

        this.COLOUR = (short) colour;

    }

}

 

?

  • Author

 

public enum Rock {
    CLAY(6705),
    COPPER(4645),
    TIN(53),
    //modified colours of the ore of each rock in rs
    IRON(2576),
    SILVER(74),
    COAL(10508),
    GOLD(8885),
    MITHRIL(-22239),
    ADAMANTITE(21662),
    RUNITE(-31437);
 
    public final short COLOUR;
 
    Rock(int colour) {
        this.COLOUR = (short) colour;
    }
}
 
?

 

 

Thanks, usefull info. But I can't find a method to get an object by colour.

Thanks, usefull info. But I can't find a method to get an object by colour.

 

 

short[] colors = rock.getDefinition().getModifiedModelColors();
  • Author
short[] colors = rock.getDefinition().getModifiedModelColors();

Thanks a lot

Hey,

Maybe someone could help me out with mining in OSBot? Can't figure out how to code a miner. Different rocks don't have a distinct name, so I though about hard coding ID's, but as it turns out, the ID's change. I failed to get objects (rocks) by position. Maybe it's possible to get rock objects and check if they are mined by colour/position? Any snippets regarding this will the greatly appreciated.

 

I wrote a snippet for this a while ago:

 

http://osbot.org/forum/topic/88389-mining-rocks-with-ore-no-ids/

Edited by Explv

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.