Skip to content

Instantly share code, notes, and snippets.

View Specnr's full-sized avatar
🎮
Yeah

Specnr

🎮
Yeah
View GitHub Profile
@Specnr
Specnr / TourneyPlayerController-v3.py
Last active October 14, 2023 22:03
A Tkinter GUI which writes commands for the tourney controller to read
import tkinter as tk
from tkinter import ttk
import os
import time
import scripts.PlayerFetcher as pf
class Player:
def __init__(self, twitch_username, display_name):
@Specnr
Specnr / PlayerControllerListener.py
Last active May 8, 2023 01:27
A OBS script which sets and swaps players around for tournaments
import obspython as S
import os
import csv
# CONFIG
player_format = "p"
focus_scene = "4 Players"
main_scene = "6 Players"
last_update = 0.0
@Specnr
Specnr / TourneyPlayerController-v2.pyw
Last active May 8, 2023 01:40
A Tkinter GUI which writes commands for the tourney controller to read
import tkinter as tk
from tkinter import ttk
import os
import time
ROWS, COLS = 2, 3
path = os.path.dirname(os.path.realpath(__file__))
obstxtPath = os.path.abspath(os.path.realpath(
os.path.join(path, 'data', 'obs.txt')))
twitchtxtPath = os.path.abspath(os.path.realpath(
@Specnr
Specnr / FetchRankStats.py
Last active February 14, 2024 02:14
Generates text files for MCSR Ranked stats that update every 30s and can be used in OBS as text sources
import os
import requests
import time
from datetime import datetime
mc_name = "specnr"
RANKED_API = "https://mcsrranked.com/api/users/"
MATCHES_API_EXTENSION = "/matches"
@Specnr
Specnr / worldBopper9001.py
Created January 10, 2023 14:07
DELETES all worlds called New World or Speedrun # in all instances AND wipes records folder
import shutil
import glob
import os
# Edit this
INST_FOLDER = "C:/MultiInstanceMC/MultiMC/instances"
RECORDS_FOLDER = "C:/Users/Spencer/speedrunigt/records"
with open("bop.log", "w") as log:
print("Deleting worlds...")
@Specnr
Specnr / FetchStats.py
Last active September 27, 2023 15:14
Generates text files that update every 30s and can be used in OBS as text sources
import os
import requests
import time
import math
from datetime import datetime
def ms_to_str(ms):
milliseconds = math.floor((ms % 1000) / 100)
seconds = math.floor((ms / 1000) % 60)
@Specnr
Specnr / TourneyPlayerController.py
Created August 18, 2022 20:02
An OBS Websocket script used to easily set and swap players for tournaments
from obswebsocket import obsws, requests
import time
host = "localhost"
port = 4444
password = ""
player_format = "p"
ws = obsws(host, port, password)
try:
@Specnr
Specnr / settingStartup.ahk
Last active January 6, 2022 04:21
Joins first world, toggles sprint, perspective and sets up pie for mapless buried treasures
; by Specnr :)
; v0.2
; Startup all instances on title screen, run script, then once all instances are in the world, press Shift+F
#NoEnv
#SingleInstance Force
SetKeyDelay, 0
SetWinDelay, 1
@Specnr
Specnr / MultiInstanceStartup.py
Created December 8, 2021 16:51
Starts up all instances quickly via command line
import os
mmc = "C:\MultiInstanceMC\MultiMC" # Change this to match your mmc location
instance_format = "1.16INST" # Change this to match your instance naming convention (mine is 1.16INST1, 1.16INST2, etc)
instance_count = 9 # Change to match instance count
for i in range(1, instance_count+1):
print(f"Starting instance {instance_format}{i}")
os.system(f"{mmc}\MultiMC.exe -l {instance_format}{i}")
@Specnr
Specnr / worldBopper9000.py
Last active May 5, 2022 16:30
DELETES all worlds called New World or Speedrun # in all instances
import shutil
import glob
import os
# Edit this
INST_FOLDER = "C:/MultiInstanceMC/MultiMC/instances"
with open("bop.log", "w") as log:
files = glob.glob(f'{INST_FOLDER}/*/.minecraft/saves/*')
for f in files: