Wintermute   0 Share Posted August 9, 2020 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 More sharing options...
Wintermute   0 Author Share Posted August 10, 2020 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 More sharing options...
Stoned   52 Share Posted August 24, 2020 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.