November 20, 20169 yr 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.
November 20, 20169 yr 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.
November 20, 20169 yr 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; } } ?
November 20, 20169 yr 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.
November 20, 20169 yr Thanks, usefull info. But I can't find a method to get an object by colour. short[] colors = rock.getDefinition().getModifiedModelColors();
November 20, 20169 yr Author short[] colors = rock.getDefinition().getModifiedModelColors(); Thanks a lot
November 21, 20169 yr 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 November 21, 20169 yr by Explv
November 22, 20169 yr Author I wrote a snippet for this a while ago: http://osbot.org/forum/topic/88389-mining-rocks-with-ore-no-ids/ Greats, thanks. Way cleaner than the one I wrote Edited November 22, 20169 yr by krapstaunosi
Create an account or sign in to comment