A C# Library for interacting with the League of Legends Client LCU.
Download from Nuget
Download from Github
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 PykeAPI API;
static void Main(string[] args)
{
API = new PykeAPI(Serilog.Events.LogEventLevel.Information);
API.PykeReady += API_PykeReady;
API.ConnectAsync().ConfigureAwait(false);
while (true)
{
Console.ReadLine();
}
}
private static void API_PykeReady(object sender, PykeAPI e)
{
API.Events.SubscribeAllEvents();
API.Events.GameflowStateChanged += (s, e) => {
Console.WriteLine(e.ToString());
};
Console.WriteLine("Pyke is ready! :)");
}
}
- = Completed
- = Planned
- 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
- Accept/Decline Match
- Get Ready Check Info
- Cancel Queue
- Select MatchMaking settings (gamemode, map, mode)
- Create Lobby
- Search For Match
- Get Client Version
- Get IO / Running Process Info
- 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
- Get Session Info
- Login/Logout
- Get Current Summoner Info
Pyke was made possible using the following libraries
- LCU-Sharp
- Json.NET
- websocketsharp