Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.
/ LeagueClientApi Public archive

A C# API wrapper for the LCU API. Objects and events are currently not being kept up to date. This was part of an old project and I might or might not update it later. You might also be interested in https://github.com/wildbook/YoloSwagger.

License

Notifications You must be signed in to change notification settings

wildbook/LeagueClientApi

Repository files navigation

LeagueClientApi

This was part of an old project of mine that never got public.

As example for how to use it, here's a very simple and unstable insta-lock program for blind pick:

var championId = 517; // Champion to lock
var session = new LeagueClient().WaitUntilConnected();

session.OnSessionEnd += (_, __) => Environment.Exit(0);
session.RegisterEndpoint("/lol-champ-select/v1/session", async (LeagueEvent x) => {
    if (x.EventType != LeagueEventType.Create)
        return;
    
    var localCellId = (int) x.Data.localPlayerCellId;
    var actions = x.Data.actions[0];
    
    foreach (var action in actions)
    {
        var actorCellId = (int) action.actorCellId;
        if (actorCellId != localCellId)
            continue;
        
        var actionId = (int)action.id;
    
        await LeagueClientApi.Api.LolChampSelect.V1.Session.Actions.Patch(session, actionId,
            new LeagueClientApi.Model.LolChampSelectChampSelectAction
            {
                Completed = true,
                ChampionId = championId
            });
    
        Console.WriteLine($"Instalock: Completed.");
    }
}});
Thread.Sleep(-1);

If you want to actually use this for something and have questions, feel free to contact me.

About

A C# API wrapper for the LCU API. Objects and events are currently not being kept up to date. This was part of an old project and I might or might not update it later. You might also be interested in https://github.com/wildbook/YoloSwagger.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages