Ayylmao42000 6 Share Posted May 1, 2017 if (getInventory().contains(i -> i != null && i.getName() != null && i.getName().equals("Law rune"))) { if (new Area(0, 0, 0, 0).contains(getLocalPlayer())) { if (getGameObjects().closest(g -> g != null && g.getName() != null && g.getName().equals("")) != null) { if (getGameObjects().closest(g -> g != null && g.getName() != null && g.getName().equals("")).interact("")) { } } else { if (getWorldHopper().quickHop(getWorlds().getRandomWorld().getID())) { sleepUntil(() -> getClient().getGameState().equals(GameState.LOGGED_IN), Calculations.random(3000, 6000)); } } } else { if (getWalking().shouldWalk()) { if (getWalking().walk(new Area(0, 0, 0, 0).getRandomTile())) { sleepUntil(() -> getWalking().shouldWalk(), Calculations.random(3000, 6000)); } } } } else { if (new Area(1, 1, 1, 1).contains(getLocalPlayer())) { if (getEquipment().get("").interact("")) { sleepUntil(() -> new Area(2, 2, 2, 2).contains(getLocalPlayer()), Calculations.random(3000, 6000)); } } else { if (getWalking().shouldWalk()) { if (getWalking().walk(new Area(1, 1, 1, 1).getRandomTile())) { sleepUntil(() -> getWalking().shouldWalk(), Calculations.random(3000, 6000)); } } } } That is example code .. after it hops .. it starts to walk towards path obstacle and interact with it, no fucking ideas why it is doing it .. is something not getting loaded fast enough after hopping ? Changed this; if (getWorldHopper().quickHop(getWorlds().getRandomWorld().getID())) { sleepUntil(() -> getClient().getGameState().equals(GameState.LOGGED_IN), Calculations.random(3000, 6000)); } To; if (getWorldHopper().quickHop(getWorlds().getRandomWorld().getID())) { sleepUntil(() -> getInventory().contains(i -> i != null && i.getName() != null && i.getName().equals("Law rune")), Calculations.random(3000, 6000)); } And now the issue seems to be gone .. so what is the issue here ? Items not being loaded quickly enough ? EDIT:// Nevermind, just witnessed it doing it again but much less now .. Link to comment Share on other sites More sharing options...
Genius 49 Share Posted May 1, 2017 if (getInventory().contains(i -> i != null && i.getName() != null && i.getName().equals("Law rune"))) { if (new Area(0, 0, 0, 0).contains(getLocalPlayer())) { if (getGameObjects().closest(g -> g != null && g.getName() != null && g.getName().equals("")) != null) { if (getGameObjects().closest(g -> g != null && g.getName() != null && g.getName().equals("")).interact("")) { } } else { if (getWorldHopper().quickHop(getWorlds().getRandomWorld().getID())) { sleepUntil(() -> getClient().getGameState().equals(GameState.LOGGED_IN), Calculations.random(3000, 6000)); } } } else { if (getWalking().shouldWalk()) { if (getWalking().walk(new Area(0, 0, 0, 0).getRandomTile())) { sleepUntil(() -> getWalking().shouldWalk(), Calculations.random(3000, 6000)); } } } } else { if (new Area(1, 1, 1, 1).contains(getLocalPlayer())) { if (getEquipment().get("").interact("")) { sleepUntil(() -> new Area(2, 2, 2, 2).contains(getLocalPlayer()), Calculations.random(3000, 6000)); } } else { if (getWalking().shouldWalk()) { if (getWalking().walk(new Area(1, 1, 1, 1).getRandomTile())) { sleepUntil(() -> getWalking().shouldWalk(), Calculations.random(3000, 6000)); } } } } That is example code .. after it hops .. it starts to walk towards path obstacle and interact with it, no fucking ideas why it is doing it .. is something not getting loaded fast enough after hopping ? Changed this; if (getWorldHopper().quickHop(getWorlds().getRandomWorld().getID())) { sleepUntil(() -> getClient().getGameState().equals(GameState.LOGGED_IN), Calculations.random(3000, 6000)); } To; if (getWorldHopper().quickHop(getWorlds().getRandomWorld().getID())) { sleepUntil(() -> getInventory().contains(i -> i != null && i.getName() != null && i.getName().equals("Law rune")), Calculations.random(3000, 6000)); } And now the issue seems to be gone .. so what is the issue here ? Items not being loaded quickly enough ? EDIT:// Nevermind, just witnessed it doing it again but much less now .. So I'm assuming it can take longer than 3 seconds to load from when that is sleepUntil is called. Just set it to something higher so that, under normal circumstances, the law runes will always be not null first (if they exist). if (getWorldHopper().quickHop(getWorlds().getRandomWorld().getID())) { sleepUntil(() -> getInventory().contains(i -> i != null && i.getName() != null && i.getName().equals("Law rune")), Calculations.random(6000, 10000)); } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.