boblemao1 0 Share Posted July 5, 2020 Im currently making a quest bot for Romeo and Juliet, but Im running into an issue with the built in walking. I'm using the following code which seems to be what others have been doing to walk to destinations. // Run inside of onLoop if(juliet == null) { // Keep walking to find her if(m.getWalking().walk(juliet_area.getRandomTile())) { sleep(Calculations.random(1000,3000)); } } Usually the walker opens doors in its path, but for some reason it does not even try to open the door to Juliets house if its closed, and instead just walks around nearby outside. I know I could manually check for the existence of this particular door while walking, and open it when nearby but that seems quite hacky, is there a more elegant way to fix this problem? I tried adding the door to the "webwalker" as suggested on other posts but that didnt fix the issue for me. Link to comment Share on other sites More sharing options...
Neffarion 485 Share Posted July 5, 2020 You could try adding the obstacle to the pathfinder, it might work for your case (or not, you have to test it) @Override public void onStart(){ PassableObstacle questDoor = new PassableObstacle("Door name", "Open", null, null, null); getWalking().getAStarPathFinder().addObstacle(questDoor); } "Door name" is the actual door name in the game, case-sensitive. "Open" for the action that you need it to do in the game with said door, also case-sensitive Link to comment Share on other sites More sharing options...
boblemao1 0 Author Share Posted July 5, 2020 This doesnt seem to do anything for me, I even tried replacing the "null"s with their respective tiles and that didnt work either. Link to comment Share on other sites More sharing options...
Neffarion 485 Share Posted July 5, 2020 47 minutes ago, boblemao1 said: This doesnt seem to do anything for me, I even tried replacing the "null"s with their respective tiles and that didnt work either. Then you have to do manual checks and open it yourself Link to comment Share on other sites More sharing options...
Stoned 52 Share Posted July 5, 2020 Use a combination of getMap().canReach() and getGameObjects().closest() to open the doors if required. You could also do hasAction("Open") as part of the filter instead of using the getMap() method. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.