• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 14:53
CET 20:53
KST 04:53
  • 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
RSL Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
ComeBackTV's documentary on Byun's Career !2Weekly Cups (Dec 8-14): MaxPax, Clem, Cure win1Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump1Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15
StarCraft 2
General
ComeBackTV's documentary on Byun's Career ! Weekly Cups (Dec 8-14): MaxPax, Clem, Cure win Did they add GM to 2v2? RSL Revival - 2025 Season Finals Preview Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament $5,000+ WardiTV 2025 Championship StarCraft2.fi 15th Anniversary Cup RSL Offline Finals Info - Dec 13 and 14! Tenacious Turtle Tussle
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 504 Retribution Mutation # 503 Fowl Play Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress
Brood War
General
How Rain Became ProGamer in Just 3 Months FlaSh on: Biggest Problem With SnOw's Playstyle [BSL21] RO8 Bracket & Prediction Contest BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion
Tourneys
[Megathread] Daily Proleagues [BSL21] RO8 - Day 2 - Sunday 21:00 CET [ASL20] Grand Finals [BSL21] RO8 - Day 1 - Saturday 21:00 CET
Strategy
Simple Questions, Simple Answers Current Meta Game Theory for Starcraft Fighting Spirit mining rates
Other Games
General Games
Nintendo Switch Thread PC Games Sales Thread Stormgate/Frost Giant Megathread Path of Exile Dawn of War IV
Dota 2
Official 'what is Dota anymore' discussion
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
Mafia Game Mode Feedback/Ideas Survivor II: The Amazon Sengoku Mafia TL Mafia Community Thread
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread YouTube Thread European Politico-economics QA Mega-thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion
World Cup 2022
Tech Support
Employee Retention in Behavioral Health: Building Computer Build, Upgrade & Buying Resource Thread
TL Community
TL+ Announced Where to ask questions and add stream?
Blogs
How Sleep Deprivation Affect…
TrAiDoS
I decided to write a webnov…
DjKniteX
James Bond movies ranking - pa…
Topin
Thanks for the RSL
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1462 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 5h 7m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 770
ProTech138
JuggernautJason88
BRAT_OK 80
MindelVK 21
StarCraft: Brood War
Mini 431
Larva 361
EffOrt 291
Dewaltoss 155
hero 94
Mong 7
Dota 2
Gorgc7212
qojqva4910
Dendi1401
Heroes of the Storm
Liquid`Hasu301
Other Games
Grubby2295
FrodaN1362
Beastyqt784
ceh9517
Fuzer 405
B2W.Neo293
ArmadaUGS221
ToD220
mouzStarbuck198
C9.Mang078
Trikslyr72
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• Reevou 15
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• HerbMon 29
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV945
League of Legends
• TFBlade1432
Other Games
• imaqtpie1443
• Shiphtur203
Upcoming Events
PiGosaur Cup
5h 7m
WardiTV 2025
16h 7m
MaNa vs Gerald
TBD vs MaxPax
ByuN vs TBD
TBD vs ShoWTimE
OSC
19h 7m
YoungYakov vs Mixu
ForJumy vs TBD
Percival vs TBD
Shameless vs TBD
The PondCast
1d 14h
WardiTV 2025
1d 17h
Cure vs Creator
TBD vs Solar
WardiTV 2025
2 days
OSC
2 days
CranKy Ducklings
3 days
SC Evo League
3 days
Ladder Legends
3 days
[ Show More ]
BSL 21
4 days
Sparkling Tuna Cup
4 days
Ladder Legends
4 days
BSL 21
5 days
Replay Cast
5 days
Monday Night Weeklies
5 days
Liquipedia Results

Completed

Acropolis #4 - TS3
RSL Offline Finals
Kuram Kup

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
Slon Tour Season 2
WardiTV 2025
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22

Upcoming

CSL 2025 WINTER (S19)
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Big Gabe Cup #3
ESL Pro League Season 23
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 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.