https://github.com/nomi-san/yasuo
:tornado: Who picks Yasuo faster than me?
https://github.com/nomi-san/yasuo
javascript lcu-api league-of-legends lol pick-lock yasuo
Last synced: 4 months ago
JSON representation
:tornado: Who picks Yasuo faster than me?
- Host: GitHub
- URL: https://github.com/nomi-san/yasuo
- Owner: nomi-san
- License: mit
- Created: 2020-02-06T10:55:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-01-18T01:44:44.000Z (over 4 years ago)
- Last Synced: 2023-03-08T17:21:51.829Z (over 3 years ago)
- Topics: javascript, lcu-api, league-of-legends, lol, pick-lock, yasuo
- Language: C#
- Homepage:
- Size: 438 KB
- Stars: 59
- Watchers: 6
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

## Who picks Yasuo faster than me?
Some code that helps you **pick and lock Yasuo or any champion as _quick as lightning_**!
You can read the Vietnamese post here 😀
## Some tools
### / [yasuoit](https://github.com/nomi-san/yasuo/tree/master/yasuoit)
- Written in **AutoIt**
- Help you how to use LCU API
### / [yasharp](https://github.com/nomi-san/yasuo/tree/master/yasharp)
- Written in **C#**
- Using websocket for event listener
- Talk to the system via League's chatbox
## 4 steps to pick and lock Yasuo immediately on your web browser!
### Preparing
- Please make sure **League Client** is opened
- A modern web browser, Chromium-based web browser is suggested
### Step 1 - Get League's auth
Open your terminal and type:
- On Windows (use **cmd**, run as admin)
```batch
WMIC PROCESS WHERE name='LeagueClientUx.exe' GET commandline
```
- On MacOS
```bash
ps x -o args | grep 'LeagueClientUx'
```
Look for the following line:
```
"--remoting-auth-token=abcdef123456ABCDEF123456" "--app-port=56789"
```
- `abcdef123456ABCDEF123456` is the auth token (**PASS**)
- `56789` is the address port (**PORT**)
### Step 2 - Login and get champion IDs
Open your web browser and enter this URL:
```http
https://127.0.0.1:PORT/lol-champions/v1/owned-champions-minimal
```
- Replace **PORT** by your port, press enter
- The login dialog will be shown, enter "**riot**" as username and your auth token 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
```
### Step 3 - Execute script
On this tab, open **console** (on Windows, press Ctrl Shift J on **Chrome**)
Copy the code below (or from [script.js](/script.js)) and paste to the console:
```js
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