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
  • Can you query a tile to get if it can be stood on by the player?


    theholynoob

    Recommended Posts

    Posted

    Can I query a Tile to find out if it is possible to stand on it?

    ie:

    Tile next = new Tile(x, y, Z);
    boolean canStand = next.isValid();
    Posted

    You might be able to just use CanReach, but I'm not sure if that would always work as expected for this purpose.

    https://dreambot.org/javadocs/org/dreambot/api/methods/map/Map.html#canReach-org.dreambot.api.methods.map.Tile-

    getMap().canReach(aTile);

    Another way is this

    https://dreambot.org/javadocs/org/dreambot/api/methods/map/Map.html#getFlag-org.dreambot.api.methods.map.Tile-

    https://dreambot.org/javadocs/org/dreambot/api/wrappers/map/impl/CollisionMap.html#isBlocked-int-

    Tile aTile = new Tile(3220,3220);
    
    int aTileFlag = getMap().getFlag(aTile);
    
    boolean canStand = CollisionMap.isBlocked(aTileFlag);

     

    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.