jdx Posted October 28, 2013 Share Posted October 28, 2013 I quit botting barrows some time ago so if theres anyone up to the task feel free to use the data below. Tunnel data setting: 452 (used in the picture) Kill data setting: 453 (contains killcount, slain brothers and whether the chest is open or not) package barrows.data; import java.util.ArrayList; import java.util.List; import org.osbot.script.MethodProvider; import task.Resetable; import barrows.pathfinding.Pathfinding; public class BarrowsData implements Resetable { private final MethodProvider methodProvider; private final int tunnelDataSetting; private final int killDataSetting; private final Object lock; private final List<Brother> slainBrothers; private Pathfinding pathFinding; public BarrowsData(MethodProvider methodProvider, int tunnelDataSetting, int killDataSetting) { this.methodProvider = methodProvider; this.tunnelDataSetting = tunnelDataSetting; this.killDataSetting = killDataSetting; this.lock = new Object(); this.slainBrothers = new ArrayList<Brother>(); this.reset(); } @Override public void reset() { synchronized (lock) { pathFinding = new Pathfinding(methodProvider.client.getConfig(tunnelDataSetting)); } slainBrothers.clear(); } public List<Room> getPath() { synchronized (lock) { return pathFinding.createPath(); } } public boolean isPuzzleSolved() { return (methodProvider.client.getConfig(tunnelDataSetting) & 0x80000000) == 0x80000000; } public boolean isRaidCompleted() { return (methodProvider.client.getConfig(tunnelDataSetting) & 0x4000000) == 0x4000000; } public boolean isChestOpen() { return (methodProvider.client.getConfig(killDataSetting) & 0x10000) == 0x10000; } public int getKillCount() { return methodProvider.client.getConfig(killDataSetting) >> 17; } public int getPuzzleChildIndex() { switch (methodProvider.client.getConfig(tunnelDataSetting) >> 29 & 0b011) { case 0: return 6; case 1: return 7; case 2: return 8; default: return -1; } } public Brother getBoss() { final int setting = methodProvider.client.getConfig(tunnelDataSetting); for (final Brother brother : Brother.values()) { final int bitmask = brother.getBossMask(); if ((setting & bitmask) == bitmask) { return brother; } } return null; } public List<Brother> getSlainBrothers() { final int setting = methodProvider.client.getConfig(killDataSetting); for (final Brother brother : Brother.values()) { final int bitmask = brother.getBossMask(); if (!slainBrothers.contains(brother) && (setting & bitmask) == bitmask) { slainBrothers.add(brother); } } return slainBrothers; } } I wont post the dependencies I used but it should give a general idea of whats going on. Some of the naming is bit off i.e. boss actually means the tomb that leads to the tunnels. If theres anything thats unclear just ask away. 4 Link to comment Share on other sites More sharing options...
XavierM Posted October 28, 2013 Share Posted October 28, 2013 Pretty nice data, thanks Link to comment Share on other sites More sharing options...