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
  • Help walking custom path?


    AsBakedAsCake

    Recommended Posts

    Alright so I've made my first custom path using Explv's map, but I can't actually figure out how to execute it. I've never used anything besides the normal web walker.

    Here's how I've done it, (is this okay?):

        Tile[] path = {
                new Tile(2884, 9797, 0),
                new Tile(2884, 9800, 0),
                new Tile(2884, 9803, 0),
                new Tile(2884, 9806, 0),
        };

    I thought I'd be able to just use getwalking.walk(path); but that doesn't work.

    Can anyone provide a simple example of how I can make this function properly? I would greatly appreciate it.

    (This is in the Taverley Dungeon, there are A LOT more tiles)

     

    Edit: I gave up, never trying to custom path again. LOL

    Link to comment
    Share on other sites

    What you can do is adding custom tiles to the web.

    getWalking().getWebPathFinder().addCustomWebPath(path);

    Below is a example from @Notorious

    LocalPath path = LocalPath(methodContext); 
    //Next update there will be path.addAll(Tile...), so you can directly add the array, but for now we can use.
    path.addAll(Arrays.asList(tilePath));
    //Now to set which direction to walk we can use (Default is forward, so this is unneeded)
    setDirection(PathDirection.FORWARD) 
    
    //Finally to take a step in the path we call walk(); to walk the whole path, walk() must be called for each step, allowing you to control its rate
    path.walk();
    Link to comment
    Share on other sites

    if (destinationTile.distance() > 3) {
                    LocalPath<Tile> path = new LocalPath<>(script);
                    path.addAll(Arrays.asList(pathArray));
                    if (path.next() != null && script.getMap().canReach(path.next())) {
                        Walker.walk(script, path.next());
                    } else {
                        Walker.walk(script, destinationTile);
                    }
                }

     

    Link to comment
    Share on other sites

    Thanks for those replies guys ^^ , I'll be trying again today. This post was made at 7:00 am after being up all night lul.

     

    update:

    -punched hole in desk-

    I'm so fucking dumb, I still can't figure out how to make this work. Oh god.. I think I give up.

    Back to webwalking, no more dungeons for me... lmfao. I am SO mad.

     

    ^^ I'm sure someone will get a kick out of this xD

    Thanks again to those who tried to help!

     

     

    Link to comment
    Share on other sites

    4 hours ago, AsBakedAsCake said:

    Thanks for those replies guys ^^ , I'll be trying again today. This post was made at 7:00 am after being up all night lul.

     

    update:

    -punched hole in desk-

    I'm so fucking dumb, I still can't figure out how to make this work. Oh god.. I think I give up.

    Back to webwalking, no more dungeons for me... lmfao. I am SO mad.

     

    ^^ I'm sure someone will get a kick out of this xD

    Thanks again to those who tried to help!

     

     

    You should be able to copy and paste my code (besides the walker part since I have my own class for that, but the generic db walker should work fine) and it should work. Since you're trying to do it in a dungeon you may need to add the web nodes to be able to walk the path. I haven't really scripted for a while so I can't really remember if you need the web nodes added or not for a local path. I use this tool for web nodes 

    , just follow the instructions and add the nodes to the onStart of your script and it should work. You could try playing around to see if you can get the local path working in a normal area like Varrock or something.

    Link to comment
    Share on other sites

    21 minutes ago, RetroBot said:

    You should be able to copy and paste my code (besides the walker part since I have my own class for that, but the generic db walker should work fine) and it should work. Since you're trying to do it in a dungeon you may need to add the web nodes to be able to walk the path. I haven't really scripted for a while so I can't really remember if you need the web nodes added or not for a local path. I use this tool for web nodes 

    , just follow the instructions and add the nodes to the onStart of your script and it should work. You could try playing around to see if you can get the local path working in a normal area like Varrock or something.

    I'll take a break and try it again in a bit when I'm not so frustrated xD. Thanks again for the help man, I really do appreciate it.

    On OSBot you can literally just do this:

        private Position[] path = {
                new Position(3254, 3421, 0), new Position(3256, 3428, 0), new Position(3264, 3428, 0),
                new Position(3273, 3428, 0), new Position(3277, 3426, 0), new Position(3281, 3422, 0)
        };
    
    
    getWalking().walkPath(path);

    I was hoping there was a similar method for dreambot. (I'm a noob)

    Link to comment
    Share on other sites

    11 hours ago, AsBakedAsCake said:

    I'll take a break and try it again in a bit when I'm not so frustrated xD. Thanks again for the help man, I really do appreciate it.

    On OSBot you can literally just do this:

    
        private Position[] path = {
                new Position(3254, 3421, 0), new Position(3256, 3428, 0), new Position(3264, 3428, 0),
                new Position(3273, 3428, 0), new Position(3277, 3426, 0), new Position(3281, 3422, 0)
        };
    
    
    getWalking().walkPath(path);

    I was hoping there was a similar method for dreambot. (I'm a noob)

    my web walker tool should be straight forward to use, if you need any help just pm me

    Link to comment
    Share on other sites

    14 minutes ago, Hoodz said:

    my web walker tool should be straight forward to use, if you need any help just pm me

    I added it to my scripts, I'll give it a try later on. Thanks for the support!

    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.