Jump to content

Problem with mining


Recommended Posts

Posted

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.

Posted
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;

    }

}

 

?

Posted

 

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.

Posted (edited)

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

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...