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
  • Try asking for help in the chatbox
  • Issues with walk() method


    Wintermute
     Share

    Recommended Posts

    Hi, new here, so first of all a big hello to everybody😀.

    Secondly, I'm having a bit of an issue with the walk() method. Might be something obvious i'm missing. I think it's best explained by an example.

    Using the following code I should be able to reach Juliet in Romeo & Juliet Quest.

    private final Tile JULIET_TILE = new Tile(3158, 3426, 1);
    if (!JULIET_TILE.getArea(0).contains(s.getLocalPlayer())){
    	s.getWalking().walk(JULIET_TILE);
    }

    The bot however gets stuck at the door entering the house. If the door is opened the bot reaches the destination. 

    Using the following code will reach her even when the door is closed.

    private final Tile STAIRCASE_TILE = new Tile(3159, 3436, 0);
    if(s.getLocalPlayer().getZ() == 0 && !STAIRCASE_TILE.getArea(1).contains(s.getLocalPlayer())){
    	s.getWalking().walk(STAIRCASE_TILE);
    }
    else {
    	if (!JULIET_TILE.getArea(0).contains(s.getLocalPlayer())){
    		s.getWalking().walk(JULIET_TILE);
    	}
    }

    Notice that it doesn't actually interact with the door or anything else for that matter. All movement/opening of doors/using staircase is done by the walk() method. I have encountered similar issue in parts of draynor manor leading to the staircase in there (seems like a door into staircase/ladder might be causing this). I guess my question is why this is happening? (Walk not reaching certain places in one call) and if there is a  general work around this issue - this example would require different code to go downstairs, which isn't very reusable.

    Link to comment
    Share on other sites

    Just to clarify slightly. My issue is that the script can walk() from tile A to tile B and from tile B to tile C, but can't walk from tile A to C.

    In the example above Tile A would be any tile outside the Juliet house, tile B is the Staircase tile, tile C is Juliet Tile.

    Link to comment
    Share on other sites

    • 2 weeks later...

    Hey! Sorry you've not had a reply. Are you using DB2 or DB3? DB2 did not handle opening of doors etc afaik and you had to manually handle doors/stairs. DB3 is much more improved and would walk from Tile A to Tile C in your case (i.e Z=0 tile to Z=1 tile)

    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    ×
    ×
    • 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.