x-coordinate for the point.
z-coordinate for the point.
local playerCoord = osrs.ClientOp.coord()
local map = osrs.World.getCollisionMap(playerCoord.level)
local selectCoord = playerCoord:move(0,4,4)
osrs.ClientOp.highlightTileOn(selectCoord:toBitPacked(), 6, true);
local flags = map:getBitFlags(selectCoord.x, selectCoord.z)
if(osrs.Math.Bitwise.isSet(flags, osrs.CollisionFlag.SQ_BLOCKED)) then
osrs.print("Tile blocks movement")
else
osrs.print("Tile does not block movement")
end
Returns whether there is a line of sight from the starting point to the end point. Returns false if not in direct line of sight.
x-coordinate for the start point.
z-coordinate for the start point.
x-coordinate for the end point.
z-coordinate for the end point.
local playerCoord = osrs.ClientOp.coord()
local map = osrs.World.getCollisionMap(playerCoord.level)
local endCoord = playerCoord:move(0,4,4)
osrs.ClientOp.highlightTileOn(endCoord:toBitPacked(), 6, true);
if(map:lineOfSight(playerCoord.x, playerCoord.z, endCoord.x, endCoord.z)) then
osrs.print("Can see tile")
else
osrs.print("Can not see tile")
end
Returns whether it is possible to walk from the starting point to the end point. Returns false if not walkable or if the given coordinates are on different levels.
x-coordinate for the start point.
z-coordinate for the start point.
x-coordinate for the end point.
z-coordinate for the end point.
local playerCoord = osrs.ClientOp.coord()
local map = osrs.World.getCollisionMap(playerCoord.level)
local endCoord = playerCoord:move(0,4,4)
osrs.ClientOp.highlightTileOn(endCoord:toBitPacked(), 6, true);
if(map:lineOfWalk(playerCoord.x, playerCoord.z, endCoord.x, endCoord.z)) then
osrs.print("Can walk to tile")
else
osrs.print("Can not walk to Tile")
end
Gets the bitflags for the specified point.