Twin Posted March 11, 2015 Share Posted March 11, 2015 case WALK_TO_WHEEL: status = "Walking to wheel"; if (myPlayer().getZ() == 2) { this.localWalker.walkPath(BANK_TO_STAIRS); sleep(random(1500,2000)); Entity stairs = objects.closest("Staircase"); if (stairs != null && stairs.exists() && Arrays.asList(stairs.getDefinition().getActions()) .contains("Climb-down")) stairs.interact("Climb-down"); sleep(random(1000, 1200)); } if (myPlayer().getZ() == 1) { Entity door = objects.closest(new Area(3207,3214,3208,3214),"Door"); Entity wheel = objects.closest("Spinning wheel"); if (door != null && door.exists()) if (Arrays.asList(door.getDefinition().getActions()) .contains("Open")) { door.interact("Open"); sleep(random(1500, 1600)); this.localWalker.walk(wheel.getX(), wheel.getY() + 1); log("Hello"); } this.localWalker.walk(wheel.getX(), wheel.getY() + 1); sleep(random(400, 500)); } break; So all my code works, everything else is flawless, except if it catches that the door contains open, then it opens the door then stands there. It reaches the cod under it, because i added a log check and it will spam it in chat. Can't figure it out Quote Link to comment Share on other sites More sharing options...
Czar Posted March 11, 2015 Share Posted March 11, 2015 Make a filter for the door with the following checks: - hasAction("Open"); - getY() <= Y (y being the y coordinate of the door closer to the stairs, not the second door for rune mysteries) if ^ that door exists, open it, if not, click the spinner and proceed with spinning. public static Filter<RS2Object> LUMBRIDGE_SOUTH_DOOR = new Filter<RS2Object>() { @Override public boolean match(RS2Object o) { if (o != null && (o.hasAction("Open")) && o.getY() < YYYY && o.getName().equalsIgnoreCase("Door")) { return true; } return false; } }; Quote Link to comment Share on other sites More sharing options...
Twin Posted March 11, 2015 Author Share Posted March 11, 2015 (edited) Make a filter for the door with the following checks: - hasAction("Open"); - getY() <= Y (y being the y coordinate of the door closer to the stairs, not the second door for rune mysteries) if ^ that door exists, open it, if not, click the spinner and proceed with spinning. public static Filter<RS2Object> LUMBRIDGE_SOUTH_DOOR = new Filter<RS2Object>() { @Override public boolean match(RS2Object o) { if (o != null && (o.hasAction("Open")) && o.getY() < YYYY && o.getName().equalsIgnoreCase("Door")) { return true; } return false; } }; So then instead of having all those checks I can just have LUMBIDGESOUTHDOOR? since it's already being filtered? Edited March 11, 2015 by twin 763 Quote Link to comment Share on other sites More sharing options...
Czar Posted March 11, 2015 Share Posted March 11, 2015 You forgot to add spinningWheel.interact("Use"), that's why it's not doing anything Quote Link to comment Share on other sites More sharing options...
Twin Posted March 11, 2015 Author Share Posted March 11, 2015 (edited) You forgot to add spinningWheel.interact("Use"), that's why it's not doing anything I have that in my other case, Once it gets into the spinning room, it executes the SPIN case, i guess i can try extending the area out a few blocks. That actually fixed it lol, gonna see how reliable this is. Edited March 11, 2015 by twin 763 Quote Link to comment Share on other sites More sharing options...
Czar Posted March 11, 2015 Share Posted March 11, 2015 (edited) Ah I guess you can make it so if the closed door doesn't exist, then go to the SPIN case (use the spinning wheel) (lumbridgeDoor == null || area.contains(myPosition) to set the SPIN state, otherwise it will just walk to the room redundantly, when it can just click the spinning wheel and immediately start spinning ;) Edited March 11, 2015 by Czar Quote Link to comment Share on other sites More sharing options...
Twin Posted March 11, 2015 Author Share Posted March 11, 2015 Ah I guess you can make it so if the closed door doesn't exist, then go to the SPIN case (use the spinning wheel) (lumbridgeDoor == null || area.contains(myPosition) to set the SPIN state, otherwise it will just walk to the room redundantly, when it can just click the spinning wheel and immediately start spinning I'll mess around with both ways tomorrow, when i got to get my proggies done Quote Link to comment Share on other sites More sharing options...
Joseph Posted March 11, 2015 Share Posted March 11, 2015 (edited) Lol nice spinner script, it is not so easy to be cheesy like me. Edited March 11, 2015 by josedpay Quote Link to comment Share on other sites More sharing options...
Twin Posted March 11, 2015 Author Share Posted March 11, 2015 Lol nice spinner script, it is not so easy to be cheesy like me. What do you mean? Quote Link to comment Share on other sites More sharing options...