Manly 879 Posted June 8, 2017 I got this piece of code: https://pastebin.com/N60QPryf Sometimes it will try to walk to the grace when it doesnt exist anymore, even though I have added checks for it existing. Code in spoiler: if (!getInventory().isFull() || getInventory().contains(Constants.GRACE_ID)) { GroundItem gr = getGroundItems().closest(GRACE_FILTER); if (gr != null) { if (isOnScreen(gr)) { if (!getLocalPlayer().isMoving()) { EntityDestination ed = new EntityDestination(getClient(), gr); InteractionEvent ie = new InteractionEvent(ed); if (gr.exists() && ie.interact("Take", InteractionSetting.MOVE)) { PaintVar.status = "Picking up mark of grace"; sleepUntil(() -> !gr.exists(), Calculations.random(900, 1200)); return 1; } else if (gr.exists()) { if (getLocalPlayer().distance(gr.getTile()) > 1) { if (getWalking().shouldWalk() && getMouse().click(getMap().tileToMiniMap(gr.getTile().getRandomizedTile(1)), false)) { /* if (Calculations.random(0, 3) == 2) { getCamera().rotateToYaw(Calculations.random(0, 2000)); }*/ return Calculations.random(100, 200); } else { log("cant click on grace: " + gr.getName() + " map.. moving camera + would usually increase error count"); getCamera().rotateToYaw(Calculations.random(0, 2000)); //errorCount++; return Calculations.random(100, 200); } } else { log("cant click on grace: " + gr.getName() + " map.. moving camera + would usually increase error count"); getCamera().rotateToYaw(Calculations.random(0, 2000)); //errorCount++; return Calculations.random(400, 500); } } } } else { if (getWalking().shouldWalk() && gr.exists()) { if (getWalking().walk(gr)) { PaintVar.status = "Walk to mark of grace"; return Calculations.random(200, 300); } } } return Calculations.random(600, 1000); } }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.