• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 06:28
CET 12:28
KST 20:28
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Intel X Team Liquid Seoul event: Showmatches and Meet the Pros9[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting10[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3
Community News
Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win62025 RSL Offline Finals Dates + Ticket Sales!10BSL21 Open Qualifiers Week & CONFIRM PARTICIPATION3Crank Gathers Season 2: SC II Pro Teams12Merivale 8 Open - LAN - Stellar Fest5
StarCraft 2
General
RotterdaM "Serral is the GOAT, and it's not close" Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win Weekly Cups (Oct 13-19): Clem Goes for Four DreamHack Open 2013 revealed Intel X Team Liquid Seoul event: Showmatches and Meet the Pros
Tourneys
Crank Gathers Season 2: SC II Pro Teams Merivale 8 Open - LAN - Stellar Fest SC4ALL $6,000 Open LAN in Philadelphia Kirktown Chat Brawl #9 $50 8:30PM EST 2025 RSL Offline Finals Dates + Ticket Sales!
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 497 Battle Haredened Mutation # 496 Endless Infection Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ What's going on with b.net? Ladder Map Matchup Stats Map pack for 3v3/4v4/FFA games BW General Discussion
Tourneys
BSL21 Open Qualifiers Week & CONFIRM PARTICIPATION [ASL20] Grand Finals Small VOD Thread 2.0 The Casual Games of the Week Thread
Strategy
How to stay on top of macro? PvZ map balance Current Meta Soma's 9 hatch build from ASL Game 2
Other Games
General Games
Path of Exile Stormgate/Frost Giant Megathread Nintendo Switch Thread The Perfect Game Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Canadian Politics Mega-thread The Big Programming Thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion! Korean Music Discussion Series you have seen recently...
Sports
MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion 2024 - 2026 Football Thread NBA General Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Challenge: Maths isn't all…
Hildegard
more word salad -- pay no h…
Peanutsc
Career Paths and Skills for …
TrAiDoS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2074 users

Twitch Stream Helper (Scene Switch/MMR)

Blogs > Ler
Post a Reply
Ler
Profile Blog Joined August 2012
Germany543 Posts
Last Edited: 2015-04-25 20:17:19
April 25 2015 19:45 GMT
#1
Hello Liquiddota,

I wrote my own scene switching script to get a higher production value while streaming. I also added auto accept when invites pop and an automatic MMR update from the new Dotabuff MMR tracker which is written into a .txt file so I have an automated and updated MMR display on my stream.

To determine the scene state, I use checksums so I do not need to inject anything nor read from the memory directly. The scene switch itself is done by sending the hotkey that I set in my streaming software.

To determine the MMR, I parse the entire HTML body with a regular expression into an array which I later write into a .txt file.

About:
Its written with AutoIT and is kinda "ghetto" coded :D
But I thought it might could help some people.
If you wanna use it feel free too, I might can help you set it up but its more for people who know what they are doing

Important notes:
- Currently coded for 1920x1080 px resulution
- Checksums differ from system to system
- MMR update needs a registered Dotabuff account and maybe even a premium acc on dotabuff.
- Can be used for any streaming software that supports hot keys for scenes.

Code is here:
+ Show Spoiler +


;-------------------------------------------------
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;@ Author: @Ler_GG
;@ Release Date: 25.04.2015
;@ Purpose: Switches between scenes while
;@ streaming. Also supports auto
;@ accept for Matchmaking.
;@ Additionaly, it gets the
;@ current MMR from Dotabuff and
;@ writes it into a .txt so it
;@ can be included on stream.
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;-------------------------------------------------


;-------------------------------------------
; @@@@@@@ INCLUDES @@@@@@@@@@@@@@@@@@@@@@@@@
;-------------------------------------------
#include <Array.au3>
#include <Constants.au3>
#include <IE.au3>
#include <WindowsConstants.au3>

;-------------------------------------------
; @@@@@@@ CHECKSUMS @@@@@@@@@@@@@@@@@@@@@@@@
;-------------------------------------------
Global $gameCheckSum_HUD_Standard = 520875552
Global $gameCheckSum_HUD_ManaPool = 451971833
Global $loginChecksumEU = 4166368323
Global $GameFoundChecksum = 1781316133
Global $apCheckSum_HUD_Standard = 3735100832
Global $cmCheckSum = 3350032685

;-------------------------------------------
; @@@@@@@ VARIABLES @@@@@@@@@@@@@@@@@@@@@@@@
;-------------------------------------------
Global $bStateLogin = True
Global $bStateGame = True
Global $nresetTimer = 0
Global $oIE

;-------------------------------------------
; @@@@@@@ MAIN @@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;-------------------------------------------

; Initial rating on startup
_getRating()

; Main loop
While 1

; Sleep to lower CPU load.
Sleep(1000)

; Updates MMR every 10 minutes.
$nresetTimer = $nresetTimer + 1
If $nresetTimer = 600 Then
_getRating()
$nresetTimer = 0
EndIf

; Updates neccesary checksums
$currentCheckSum = PixelChecksum(1608, 14, 1713, 31)
$cmCheckS = PixelChecksum(551, 205, 659, 219)
$apCheckS = PixelChecksum(372, 9, 524, 32)
$GameFound = PixelChecksum(640, 410, 660, 430)

; Automatically clicks accept game button.
If $GameFound = $GameFoundChecksum Then
MouseClick("left", 660, 430)
EndIf

; Checks for Main menu
If $currentCheckSum = $loginChecksumEU Or $apCheckS = $apCheckSum_HUD_Standard Or $cmCheckS = $cmCheckSum And $bStateLogin = True Then
Send("{F6}", 0)
Sleep(100)
Send("{F7}", 0)
$bStateLogin = False
$bStateGame = True
EndIf

; Checks if Ingame
$currentCheckSum = PixelChecksum(1687, 9, 1744, 28)
If $currentCheckSum = $gameCheckSum_HUD_Standard And $bStateGame = True Or $currentCheckSum = $gameCheckSum_HUD_ManaPool And $bStateGame = True Then
Send("{F7}", 0)
Sleep(100)
Send("{F6}", 0)
$bStateGame = False
$bStateLogin = True
EndIf

WEnd

;-------------------------------------------
; @@@@@@@ FUNCTIONS @@@@@@@@@@@@@@@@@@@@@@@@
;-------------------------------------------

;-------------------------------------------
; Function: _getRating()
;
; Usage: - Parses html body of Dotabuff
; to determine the actual mmr
; value.
;-------------------------------------------
Func _getRating()

; Opens IE Invisible
$oIE = _IECreate("about:blank", 0, 0)

; Navigates to Dotabuff Profile
_IENavigate($oIE, "http://www.dotabuff.com/players/115909501")

; Returns all digits in the html body with the format 0000 in an array.
; Index 0 is the solo MMR when logged in.
$stringMMR = StringRegExp(_IEBodyReadText($oIE), "\d\d\d\d", 1)
_writeMMRData($stringMMR)

;~ MsgBox(0,"MMR",$stringMMR[0])

; Closes IE
_IEQuit($oIE)

EndFunc ;==>_getRating

;-------------------------------------------
; Function: _writeMMRData()
; Usage:
; - Writes an array into a file.
; Variables:
; - $aData: Array to write into file.
;-------------------------------------------
Func _writeMMRData($aData)
FileOpen("mmr.txt", 2)
FileWrite("mmr.txt", $aData[0])
FileClose("mmr.txt")
EndFunc ;==>_writeMMRData


Pastebin:
pastebin.com



@Ler_GG

Twitter: @Ler_GG | Facebook: lergg | youtube: lerlolgg | Twitch.tv/gg_nore | #ArtOfSupport
xeliana
Profile Joined August 2010
Austria60 Posts
April 29 2015 08:54 GMT
#2
hey ...

you might want to get a github account and share it there for people to suggest changes and bugs.
keep calm and play dota!
Please log in or register to reply.
Live Events Refresh
Next event in 2h 32m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 101
Rex 73
Railgan 23
MindelVK 20
StarCraft: Brood War
Britney 57542
Sea 19041
Calm 6113
firebathero 885
Zeus 782
Pusan 536
Mini 287
Last 232
ToSsGirL 110
Killer 90
[ Show more ]
Barracks 48
Mong 46
JulyZerg 40
Sea.KH 24
soO 17
Terrorterran 11
Icarus 7
Dota 2
XaKoH 893
XcaliburYe272
ODPixel263
febbydoto23
League of Legends
JimRising 529
Counter-Strike
zeus1154
x6flipin515
edward1
Heroes of the Storm
Khaldor259
Other Games
summit1g18395
singsing1300
B2W.Neo564
nookyyy 93
Organizations
Other Games
gamesdonequick862
StarCraft: Brood War
lovetv 13
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• LUISG 128
• Adnapsc2 24
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• Ler68
League of Legends
• Jankos3727
• Stunt255
Upcoming Events
BSL Team A[vengers]
2h 32m
Cross vs Sobenz
Sziky vs IcaruS
SC4ALL
3h 32m
SC4ALL
3h 32m
BSL 21
7h 32m
Replay Cast
21h 32m
Wardi Open
1d
Monday Night Weeklies
1d 5h
Replay Cast
1d 11h
Sparkling Tuna Cup
1d 22h
WardiTV Korean Royale
2 days
[ Show More ]
LAN Event
2 days
Replay Cast
2 days
WardiTV Korean Royale
3 days
LAN Event
3 days
The PondCast
3 days
LAN Event
4 days
LAN Event
5 days
Korean StarCraft League
5 days
CranKy Ducklings
5 days
WardiTV Korean Royale
6 days
LAN Event
6 days
IPSL
6 days
dxtr13 vs OldBoy
Napoleon vs Doodle
Sparkling Tuna Cup
6 days
Liquipedia Results

Completed

CSL 2025 AUTUMN (S18)
CranK Gathers Season 2: SC II Pro Teams
Eternal Conflict S1

Ongoing

BSL 21 Points
BSL 21 Team A
C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
SC4ALL: Brood War
SC4ALL: StarCraft II
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025

Upcoming

YSL S2
BSL Season 21
SLON Tour Season 2
BSL 21 Non-Korean Championship
HSC XXVIII
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
Stellar Fest
META Madness #9
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.