Jump to content

Problem with mining


Butters
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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;

    }

}

 

?

Link to comment
Share on other sites

 

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

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