Giter VIP home page Giter VIP logo

native-farsight-module's Introduction

Contributors Forks Stargazers Issues MIT License Donate

🔭 Farsight 🔭

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

Features

Each memory snapshot produces game state information the moment the snapshot was taken. Each snapshot includes the following:

  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

Each game object currently has the following data. If you need any extra unit information, create an [Issue][issues-url] in the form of a feature request.

!Not possible: Aggregate player stats: (Kills, Deaths, Assists, CS, Vision Score)!

  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)


Offsets

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.


Methods

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

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.


License

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.

native-farsight-module's People

Contributors

sdomi4 avatar floh22 avatar himyu avatar laraakaa avatar krroks avatar bangingheads avatar kd0010 avatar dcapape avatar saadbruno avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.