Git Product home page Git Product logo

yasuo's Introduction

Who picks Yasuo faster than me?

Some code that helps you pick your favorite champion as quick as lightning!


Some tools


  • Written in AutoIt
  • Help you how to use LCU API
  • Written in C#
  • Using websocket for event listener
  • Talk to the system via League's chatbox

Play on web browser with JavaScript

Prepare

  • Please make sure League Client is opened.
  • A web browser (e.g Chrome, Opera or FireFox).

Take action

1. Open your terminal and type:

  • On Windows (use cmd, administrator is required)

    WMIC PROCESS WHERE name='LeagueClientUx.exe' GET commandline
  • On MacOS

    ps x -o args | grep 'LeagueClientUx'

2. Look for the following line

"--remoting-auth-token=abcdef123456ABCDEF123456" "--app-port=56789"
  • abcdef123456ABCDEF123456 is the auth key.
  • 56789 is the address port.

3. Open your browser, enter the URL:

https://127.0.0.1:PORT/lol-champions/v1/owned-champions-minimal
  • Replace PORT by your port.
  • After the login dialog shown, enter "riot" as username and your auth key as password.

The browser will show all your owned and free champions (as JSON), please find ID of your favorite champions. Use Ctrl + F with keyword:

"name":"champion_name_here

4. On this tab, open console (on Windows, press Ctrl + Shift + J with Chrome)

Enter the code below (or copy code in original.js if ES6 is supported):

var start=function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[157],a=async function(t,n,a){return await fetch(n,{method:t,body:a,headers:{"Content-type":"application/json; charset=UTF-8"}}).then(function(t){return t.text()}).then(function(t){return JSON.parse(t.length?t:"{}")})},e=async function(t,n){return 0===Object.keys(await a("PATCH","/lol-champ-select/v1/session/actions/".concat(t),JSON.stringify({championId:n}))).length},c=setInterval(async function(){if(await async function(){return"InProgress"===(await a("GET","/lol-matchmaking/v1/ready-check")).state}())await async function(){return await a("POST","/lol-matchmaking/v1/ready-check/accept")}();else if((t=await async function(){var t=await a("GET","/lol-champ-select/v1/session"),n=t.localPlayerCellId,e=t.actions;return e?e[0].filter(function(t){return t.actorCellId===n})[0].id:-1}())>-1){for(var i=0;i<n.length&&!await e(t,n[i]);i++);await async function(t){return await a("POST","/lol-champ-select/v1/session/actions/".concat(t,"/complete"))}(t),clearInterval(c)}},250)};

5. Call start function, the first arg is champion ID array, e.g

start([157, 10, 1]); // Yasuo, Kayle, Annie

6. Make a Practice or a Custom/Normal game (Summoner's Rift - blind pick only), and enjoy!

yasuo's People

Contributors

nomi-san avatar meouwu avatar

Watchers

James Cloos 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.