npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@larseble/farsight

v1.2.5

Published

A native library to read League of Legends process memory

Downloads

5

Readme

Contributors Forks Stargazers Issues MIT License Donate

A simple passive memory reader which aims to retrieve information about League of Legends spectator games which the API does not provide. This a nodejs native module which utilizes native memory reading with a js interface.

Farsight uses Memory Reading to get information that the Riot API does not expose. Riot's policy in the past has been to allow passive memory reading, which is exactly what this program does, but this may change at any time. Farsight currently provides little use during live games and is tailored to be used during spectate games. During live games, objects the player does not see will not be read properly, leading to incorrect or outdated data

  1. Game time
  2. Next dragon type to spawn
  3. List of Champions
  4. List of Turrets
  5. List of inhibitors
  6. Misc game objects
  1. Health/Max Health
  2. Mana/Max Mana
  3. Position
  4. Team
  5. Unit Id
  6. Display Name
  7. Current Gold / Total Gold
  8. Level / Experience

(7 and 8 player only)


Roughly every two weeks League of Legends updates and its memory layout changes slightly, so offsets must be updated.

Offsets will be updated within roughly 24-48 hours, though this may not always be the case. Keep in mind, this is an open source project maintained in free time, please do not harass me or others for offsets in the issues or anywhere else. You are welcome to assist and contribute to this project by updating the offsets yourselves and creating a pull request so others can use them.

There is a Text tutorial avaible which outlines the process.


connectToLeague

  • [out] success: bool            Operation sucess

init library connection with the league process.

disconnectFromLeague

  • [out] success: bool            Operation sucess

close library connection with the league process.

setOffsets

var result = setOffsets({
        gameTime: 0x316FDE4,
        objIndex: 0x8,
        objTeam: 0x34,
        objNetworkID: 0xB4,
        objPosition: 0x1DC,
        objHealth: 0xE7C,
        objMaxHealth: 0xE8C,
        objMana: 0x029C,
        objMaxMana: 0x2AC,
        objName: 0x2DB4,
        objLvl: 0x35A4,
        objExperience: 0x3594,
        objCurrentGold: 0x1BB4,
        objTotalGold: 0x1BC4,
        objDisplayName: 0x54,
        objDisplayNameLength: 0x64,


        objectManager: 0x18D9ACC,
        objectMapCount: 0x2C,
        objectMapRoot: 0x28,
        objectMapNodeNetId: 0x10,
        objectMapNodeObject: 0x14,

        heroList: 0x18D9B6C,
        minionList: 0x252729C,
        turretList: 0X316EAC4,
        inhibitorList: 0x0
    });
  • [in] offsets: Object          An object containing the needed offsets. Object format can be seen in code example
  • [out] success: bool            Operation sucess

Sets the offsets used for memory reading. Must be done before any snapshot is requested, otherwise snapshot creation fails. Currently cannot be reset once set.

setChampionNames

  • [in] champions: string[]  A lowercase list of all champion names/ids
  • [out] success: bool            Operation sucess

Sets the list of champions to scan for. Most common usage will be to use a full list of all champions currently in League of Legends. List must be lower case! Currently cannot be reset once set.

isReady

  • [out] ready state: bool    Library readiness state.

Wether or not the library is ready to create Snapshots

makeSnapshot

  • [out] snapshot: Object      Snapshot object containing current game state information

Creates a snapshot of all game objects currently in game. Farsight must be connected, as well as champion list and offsets provided.

Members

autoImportChampions

  • boolean: Wether or not Farsight should automatically fetch the current list of all champions from Community Dragon. This takes place on connectToLeague.

True by default. If set to false, you must provide the list before requesting a snapshot.

autoImportOffsets

  • boolean: Wether or not Farsight should automatically fetch the current offsets from this repository. Repository currently not configurable! This takes place on connectToLeague.

True by default. If set to false, you must provide offsets before requesting a snapshot.


Example usage is provided in the example folder of this repo. It currently contains a very basic console logger which conntects and prints the snapshot to the console. In case you write a simple use case using this library, please feel free to create a PR to add your example to this folder.


Distributed under the MIT License. See LICENSE for more information.

This is a standalone project from Lars Eble. Riot Games does not endorse or sponsor this project.