Pyke 0.2.0

Pyke is a library for interacting with Riot's League of Legends Client (LCU)

Install-Package Pyke -Version 0.2.0
dotnet add package Pyke --version 0.2.0
<PackageReference Include="Pyke" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Pyke --version 0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Pyke, 0.2.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Pyke as a Cake Addin
#addin nuget:?package=Pyke&version=0.2.0

// Install Pyke as a Cake Tool
#tool nuget:?package=Pyke&version=0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Pyke

Pyke Nuget Nuget Prerelease CodeFactor

A C# Library for interacting with the League of Legends Client LCU.

Installation

Nuget

Download from Nuget

Github Releases

Download from Github

Usage Example

This example shows how to hook GameglowState Changes, which we can use to detect if we are in matchmaking, champ select, post-game summary, etc...

    class Program
    {
        private static LeagueAPI API;
        static void Main(string[] args)
        {
            API = new LeagueAPI().ConnectAsync().GetAwaiter().GetResult();

            API.Events.SubscribeEvent(EventType.GameflowStateChanged);
            API.Events.GameflowStateChanged += Events_GameflowStateChanged;
            Console.ReadLine();
        }

        private static void Events_GameflowStateChanged(object sender, State e)
        {
            Console.WriteLine("State Changed: " + e.ToString());
        }
    }

Features

  • = Completed
  • = Planned

Champ Select

  • Get All Champions
  • Get Pickable Champions
  • Get Bannable Champions
  • Get Current Champ Select Session
  • Select & Lock in a Champion
  • Set Champ Select Session Action
  • Get Active Trades (And trade by id)
  • Accept/Decline/Request/Cancel a trade
  • Get Friendly, Enemey, and full team compositions
  • Get list of Pickable Skins (by id)
  • Select Summoner Spells
  • Select Skin
  • Select Ward Skin
  • Ban Champion

MatchMaking

  • Accept/Decline Match
  • Get Ready Check Info
  • Cancel Queue
  • Select MatchMaking settings (gamemode, map, mode)
  • Create Lobby
  • Search For Match

Client Info

  • Get Client Version
  • Get IO / Running Process Info

Events

  • GameflowStateChanged (Fired when switching between Lobby, Matchmaking, Champ Select, In Game, PostGame Summary, "none")
  • OnMatchFound
  • SelectedChampionChanged (Fired when you hover a new champion in champ select, or lock in a champion)
  • ChampionTradeRecieved (Fired whenever ANY changes occur within the trading system. Including: a new trade available, a trade has been requested, a trade has been declined/accepted)
  • OnChampSelectTurnToPick (Fired whenever it is your turn to pick or ban a champion. Event passes PickType which specifies if it is your turn to pick or ban)
  • OnSessionUpdated (Fired whenever anything changes during champ select, including the timer. It is reccomended you don't put anything too resource intensive inside this event as it fires very often)
  • OnSummonerSelectedChampion (Event passes SummonerSelection which contains summoner info (such as their team, name, summoner spells), and selection info (Such as champion, pick or ban))
  • A bunch of Direct Message Events
  • Friend Request Events
  • On Login/Logout
  • Literally so many more

Login/Account

  • Get Session Info
  • Login/Logout
  • Get Current Summoner Info

Libraries Used

Pyke was made possible using the following libraries

  • LCU-Sharp
  • Json.NET
  • websocketsharp

Pyke

Pyke Nuget Nuget Prerelease CodeFactor

A C# Library for interacting with the League of Legends Client LCU.

Installation

Nuget

Download from Nuget

Github Releases

Download from Github

Usage Example

This example shows how to hook GameglowState Changes, which we can use to detect if we are in matchmaking, champ select, post-game summary, etc...

    class Program
    {
        private static LeagueAPI API;
        static void Main(string[] args)
        {
            API = new LeagueAPI().ConnectAsync().GetAwaiter().GetResult();

            API.Events.SubscribeEvent(EventType.GameflowStateChanged);
            API.Events.GameflowStateChanged += Events_GameflowStateChanged;
            Console.ReadLine();
        }

        private static void Events_GameflowStateChanged(object sender, State e)
        {
            Console.WriteLine("State Changed: " + e.ToString());
        }
    }

Features

  • = Completed
  • = Planned

Champ Select

  • Get All Champions
  • Get Pickable Champions
  • Get Bannable Champions
  • Get Current Champ Select Session
  • Select & Lock in a Champion
  • Set Champ Select Session Action
  • Get Active Trades (And trade by id)
  • Accept/Decline/Request/Cancel a trade
  • Get Friendly, Enemey, and full team compositions
  • Get list of Pickable Skins (by id)
  • Select Summoner Spells
  • Select Skin
  • Select Ward Skin
  • Ban Champion

MatchMaking

  • Accept/Decline Match
  • Get Ready Check Info
  • Cancel Queue
  • Select MatchMaking settings (gamemode, map, mode)
  • Create Lobby
  • Search For Match

Client Info

  • Get Client Version
  • Get IO / Running Process Info

Events

  • GameflowStateChanged (Fired when switching between Lobby, Matchmaking, Champ Select, In Game, PostGame Summary, "none")
  • OnMatchFound
  • SelectedChampionChanged (Fired when you hover a new champion in champ select, or lock in a champion)
  • ChampionTradeRecieved (Fired whenever ANY changes occur within the trading system. Including: a new trade available, a trade has been requested, a trade has been declined/accepted)
  • OnChampSelectTurnToPick (Fired whenever it is your turn to pick or ban a champion. Event passes PickType which specifies if it is your turn to pick or ban)
  • OnSessionUpdated (Fired whenever anything changes during champ select, including the timer. It is reccomended you don't put anything too resource intensive inside this event as it fires very often)
  • OnSummonerSelectedChampion (Event passes SummonerSelection which contains summoner info (such as their team, name, summoner spells), and selection info (Such as champion, pick or ban))
  • A bunch of Direct Message Events
  • Friend Request Events
  • On Login/Logout
  • Literally so many more

Login/Account

  • Get Session Info
  • Login/Logout
  • Get Current Summoner Info

Libraries Used

Pyke was made possible using the following libraries

  • LCU-Sharp
  • Json.NET
  • websocketsharp

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.2.0 230 9/18/2020
0.1.1 127 9/4/2020
0.1.0 177 9/1/2020