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
  • Iterate through Visible Tiles


    Constuck

    Recommended Posts

    Hey guys, I've been working on this all day and I can't find out how to do it. How can I iterate through all visible tiles to check which one my mouse is hovering over?

    I know:

    getMap().getPolygon(t.getTile()).contains(getMouse().getPosition())
    

    will tell me if my mouse is hovering over TileReference t, and I know:

    getMap().isTileOnScreen(t.getTile()) 

    will tell me if the tile is visible, but I need to figure out how to get every Tile/TileReference around the player.

     

     

    I've tried getMap().getTileGrid(getClient().getPlane())[x][y] for x's and y's near the player but it doesn't seem to work unless I put in x=0 y=0. Any ideas?

    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.