September 11, 201312 yr 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.
September 12, 201312 yr 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.
September 12, 201312 yr 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!