Skip to content

Instantly share code, notes, and snippets.

@bangingheads
bangingheads / README.md
Created November 21, 2024 16:32
TFT Team Planner Codes

TFT Team Planner Codes

This gist describes how team planner codes are generated. This allows you to create your own team comps for pasting in the client without needing to use the client.

The code is a hexadecimal representation of champions. Here's a breakdown of the bits in the code. Example code 010102030405060708090ATFTSet13

01 01 02 03 04 05 06 07 08 09 0A TFTSet13
Always starts with 01 Champion 1 Champion 2 Champion 3 Champion 4 Champion 5 Champion 6 Champion 7 Champion 8 Champion 9 Champion 10 TFT Set ID
@bangingheads
bangingheads / unlock_skin_shard.py
Created October 17, 2023 22:04
Show skin shards for champion's without a skin
from pprint import pprint
from lcu_driver import Connector
import requests
import easygui
connector = Connector()
@connector.ready
async def connect(connection):
version = requests.get("https://ddragon.leagueoflegends.com/api/versions.json").json()[0]
@bangingheads
bangingheads / example.js
Last active April 14, 2022 13:47
Using Cloudflare Workers to Make Requests to Riot Games API
/*
Cloudflare Workers Script to make request to the Riot Games API
By: BangingHeads
Supports GET Requests
Supports Path and GET Parameters as GET Parameters
Example path: https://example.bangingheads.workers.dev/api/?region=na1&endpoint=/lol/summoner/v4/summoners/by-name/{summonerName}&summonerName=Headbang
Use Guide on Hextech Docs (https://hextechdocs.dev) if you need more help
*/
@bangingheads
bangingheads / cdragonrates.py
Created November 22, 2021 15:25
Script to grab champion play rates from cdragon in meraki format
import json
import re
import requests
all_champs = {}
data = requests.get("https://raw.communitydragon.org/latest/plugins/rcp-fe-lol-champion-statistics/global/default/rcp-fe-lol-champion-statistics.js")
matches = re.findall('.exports=({.*)},', data.text)
if len(matches) > 0:
match = matches[0]
match = re.sub("([A-Z0-9]*):", r'"\1":', match)
{
"matchInfo": {
"matchId": "2661e9c6-10a7-48da-821a-1eb480afc77e",
"mapId": "/Game/Maps/Port/Port",
"gameLengthMillis": 470249,
"gameStartMillis": 1630452346572,
"provisioningFlowId": "Matchmaking",
"isCompleted": true,
"customGameName": "",
"queueId": "spikerush",