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
  • LocalPath declaration, definition, & usage


    Xephy
     Share

    Recommended Posts

    Could somebody provide me an example of a local path being created and used? I'm at a bit of a loss for how to do it.

    Link to comment
    Share on other sites

    Could somebody provide me an example of a local path being created and used? I'm at a bit of a loss for how to do it.

     

    d7e87e13e2ff21e1ecb869220fedf92e.png

     

    According to the API it is generified and takes any instance of Locatable

     

    7ac47c41cc5df427d972bea3045b68e0.png

     

    Tile is a Locatable so you do

    LocalPath<Tile> localPath = new LocalPath<>();
    

    After further checking the API you will notice LocalPath's constructor

     

    8abfeb08c3f05786ac3e43e811050e09.png

     

    Assuming you are creating the Path in your Main script class

    LocalPath<Tile> localPath = new LocalPath<>(this);
    

    Now you start adding Tiles to it since LocalPath implements List

    localPath.add(new Tile(0,0,0));
    

    Then you have to use the other methods found in the API which should not be a problem: API

    4555c83e312cfbd698f4f118d825e32f.png

     

    Note that LocalPath#reverse is broken and will not do anything

     

    Edit: API ref link

    Edited by Dinh
    Link to comment
    Share on other sites

    • 3 years later...

    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.