OSRS Plugin API
    Preparing search index...

    Function playerCoord

    • Gets the current coordinates of the specified player.

      Parameters

      • playerId: number

        id of the npc.

      Returns MapCoord

      the coordinates of the player in a MapCoord class.

      local playerCoord = osrs.ClientOp.playerCoord(id)
      osrs.printf("Player Map Coord - X: %d, level: %d, Z: %d", playerCoord.x, playerCoord.level, playerCoord.z)
      local level, mapX, mapZ, tileX, tileZ = playerCoord:getMapTile()
      osrs.printf("Player Map Tile: %d, %d, %d, %d, %d",level, mapX, mapZ, tileX, tileZ)