Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Finding if tile is walkable

Featured Replies

Hello friends,

 

I need to be able to tell if a tile is walkable, and I will use this on several hundred different tiles while generating a path to a destination.

 

Does anyone know the best way to do this at the moment? I can't find anything good.

You may call client.getClippingPlanes() - there are 4 planes in OSRS. Then get current plane via client.getPlane(). So:

 

XClippingPlane plane = client.getClippingPlanes()[client.getPlane()];

 

XClippingPlane have method getTileFlags() returning int[][] - flags of tiles of current region.

 

Current region starts at {client.getMapBaseX(), client.getMapBaseY()}, so if you want to get flags of {X,Y} cell, you need to exec like

 

int[][] tileFlags = ...;

int flags = tileFlags[X - client.getMapBaseX()][Y-getMapBaseY()];

 

This is known flags (those i used):

 

[Flags]
  enum TileFlag : int
  {
    WALL_NORTH_WEST = 0x1,
      WALL_NORTH = 0x2,
      WALL_NORTH_EAST = 0x4,
      WALL_EAST = 0x8,
      WALL_SOUTH_EAST = 0x10,
      WALL_SOUTH = 0x20,
      WALL_SOUTH_WEST = 0x40,
      WALL_WEST = 0x80,
      BLOCKED = 0x100, //забор пересекает, дерево, какой-то объект -> непроходима
    RANGE_BLOCKED = 0x20000, //дистанционные атаки не проходят через эту клетку
    IMPASSABLE = 0x200000, //тайл непроходимый из-за самого себя (вода, наклон тайла, т.п.)

    TILE_NOT_LOADED = 0xFFFFFF, //тайл на краю, не загружен толком
  }

 

What you want is BLOCKED - some object blocks pass on this tile (wall for example) and IMPASSABLE - tile is impassable due to it's landscape angle or it is water or etc.

WALL_xx - means that moving to {X,Y} from xx is not allowed.

 

Hope this will help you. Have working world pathfinding code based on this data.

  • Author

You may call client.getClippingPlanes() - there are 4 planes in OSRS. Then get current plane via client.getPlane(). So:

 

XClippingPlane plane = client.getClippingPlanes()[client.getPlane()];

 

XClippingPlane have method getTileFlags() returning int[][] - flags of tiles of current region.

 

Current region starts at {client.getMapBaseX(), client.getMapBaseY()}, so if you want to get flags of {X,Y} cell, you need to exec like

 

int[][] tileFlags = ...;

int flags = tileFlags[X - client.getMapBaseX()][Y-getMapBaseY()];

 

This is known flags (those i used):

 

[Flags]

  enum TileFlag : int

  {

    WALL_NORTH_WEST = 0x1,

      WALL_NORTH = 0x2,

      WALL_NORTH_EAST = 0x4,

      WALL_EAST = 0x8,

      WALL_SOUTH_EAST = 0x10,

      WALL_SOUTH = 0x20,

      WALL_SOUTH_WEST = 0x40,

      WALL_WEST = 0x80,

      BLOCKED = 0x100, //забор пересекает, дерево, какой-то объект -> непроходима

    RANGE_BLOCKED = 0x20000, //дистанционные атаки не проходят через эту клетку

    IMPASSABLE = 0x200000, //тайл непроходимый из-за самого себя (вода, наклон тайла, т.п.)

    TILE_NOT_LOADED = 0xFFFFFF, //тайл на краю, не загружен толком

  }

 

What you want is BLOCKED - some object blocks pass on this tile (wall for example) and IMPASSABLE - tile is impassable due to it's landscape angle or it is water or etc.

WALL_xx - means that moving to {X,Y} from xx is not allowed.

 

Hope this will help you. Have working world pathfinding code based on this data.

 

Thanks this is great!

 

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.