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
  • Creating a polygonal area


    xinobyte

    Recommended Posts

    Is there a way to create a non rectangular Area ?
    I couldn't find an answer in the docs and I can't do it tile by tile cause it has 500+ of them.

    Link to comment
    Share on other sites

    • 4 weeks later...
    • 2 months later...

    Try this. With a little math you can do amazing things with it.

     

    public Area getSurroundingArea(int radius)

     

    Does this return a polygonal area around you with all valid tiles or something? that would be amazing

    Link to comment
    Share on other sites

    All tiles within x radius, with player being centerpoint 

     

    I'm just curious if it includes the tiles that you can't move to/are off the map.

    Link to comment
    Share on other sites

    I'm just curious if it includes the tiles that you can't move to/are off the map.

     

    Yeah, all tiles. You can filter out unreachable tiles after generating the surrounding area. Be mindful of the size you generate, i try to not do more than 10 unless specifically necessary as it will take significantly longer to generate the area

    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.