the player to check the current route for.
the length of the route between the player's current tile and the tile they will be at on the next server tick.
local maxTime = 20
local startTime = osrs.getTime()
wasFound, playerId = osrs.ClientOp.playerFindSelf();
local function doLogic()
if(osrs.getTime() - startTime > maxTime) then
osrs.print("Finished printing route lengths")
return false
end
osrs.printf("Route Length: %s", osrs.ClientOp.playerRouteLength(playerId))
return true
end
osrs.print("Start printing route lengths")
drawToken = osrs.setInterval(doLogic, 0, drawToken)
Gets the length between the specified player's current tile and the tile they will be at on the next server tick. WARNING: Do not use this function to attempt calculating the player's total route length.