plekstw Posted December 13, 2015 Posted December 13, 2015 Hey, i'm having problems with these doors: Here close to the player: Here where the door is selected: The bot won't open these doors, just will try to open the middle doors. Here is my code: http://pastebin.com/yqm4nJvi
FrostBug Posted December 13, 2015 Posted December 13, 2015 Pretty sure Flamezz gave you the solution in your last thread
plekstw Posted December 13, 2015 Author Posted December 13, 2015 (edited) Yes, i use his solution in my script mate, still problem only with these 2 doors. It can open 3/4 diffrent doors, just wont open these exact 2 Pretty sure Flamezz gave you the solution in your last thread if(knight != null && !getMap().canReach(knight) && !myPlayer().isMoving()){ if(doorHandler.handleNextObstacle(knight)) { if (camera.toEntity(door)) { if (doorHandler.handleNextObstacle(door)) { new ConditionalSleep(1000) { @Override public boolean condition() throws InterruptedException { return door.hasAction("Close"); } }.sleep(); } } } } Edited December 13, 2015 by plekstw
FrostBug Posted December 13, 2015 Posted December 13, 2015 If the built in doorhandler doesn't cut it, try the other solution he posted to get the closest reachable closed door: getObjects().closest("Door", o -> o.hasAction("Open") && getMap().canReach(o)); 1
plekstw Posted December 13, 2015 Author Posted December 13, 2015 If the built in doorhandler doesn't cut it, try the other solution he posted to get the closest reachable closed door: getObjects().closest("Door", o -> o.hasAction("Open") && getMap().canReach(o)); http://scr.hu/0d53/w46oj http://scr.hu/0d53/qiki7 i get this ;x
Explv Posted December 13, 2015 Posted December 13, 2015 RS2Object closestDoor = getObjects().closest(true, obj -> obj.getName().equals("Door") && obj.hasAction("Open")); if(closestDoor != null) closestDoor.interact("Open");