Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Walker doesn't open front door to Juliet's house


    boblemao1

    Recommended Posts

    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

    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

    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

    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

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.