• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 19:08
CET 01:08
KST 09:08
  • 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
Weekly Cups (Dec 15-21): Classic wins big, MaxPax & Clem take weeklies3ComeBackTV's documentary on Byun's Career !11Weekly Cups (Dec 8-14): MaxPax, Clem, Cure win4Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump1Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2
StarCraft 2
General
ComeBackTV's documentary on Byun's Career ! Team TLMC #5: Winners Announced! What's the best tug of war? The Grack before Christmas Weekly Cups (Dec 15-21): Classic wins big, MaxPax & Clem take weeklies
Tourneys
OSC Season 13 World Championship $5,000+ WardiTV 2025 Championship $100 Prize Pool - Winter Warp Gate Masters Showdow Sparkling Tuna Cup - Weekly Open Tournament Winter Warp Gate Amateur Showdown #1
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 505 Rise From Ashes Mutation # 504 Retribution Mutation # 503 Fowl Play Mutation # 502 Negative Reinforcement
Brood War
General
BW General Discussion How soO Began His ProGaming Dreams Klaucher discontinued / in-game color settings BGH Auto Balance -> http://bghmmr.eu/ Recommended FPV games (post-KeSPA)
Tourneys
[Megathread] Daily Proleagues [BSL21] LB SemiFinals - Saturday 21:00 CET [BSL21] WB & LB Finals - Sunday 21:00 CET Small VOD Thread 2.0
Strategy
Simple Questions, Simple Answers Game Theory for Starcraft Current Meta Fighting Spirit mining rates
Other Games
General Games
Nintendo Switch Thread Mechabellum Stormgate/Frost Giant Megathread Beyond All Reason Path of Exile
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 12 Days of Starcraft The Games Industry And ATVI Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece
Sports
2024 - 2026 Football Thread Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List TL+ Announced Where to ask questions and add stream?
Blogs
National Diversity: A Challe…
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: 1584 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 9h 52m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
elazer 239
JuggernautJason93
StarCraft: Brood War
Shuttle 685
Stork 332
910 50
yabsab 25
GoRush 13
NaDa 9
Dota 2
syndereN984
Heroes of the Storm
Khaldor227
Other Games
tarik_tv7045
ViBE182
Liquid`Hasu165
XaKoH 126
Mew2King80
JimRising 41
Organizations
Other Games
gamesdonequick1302
BasetradeTV50
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• RyuSc2 63
• davetesta55
• musti20045 47
• IndyKCrew
• Migwel
• AfreecaTV YouTube
• sooper7s
• intothetv
• Kozan
• LaughNgamezSOOP
StarCraft: Brood War
• blackmanpl 42
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• Ler75
League of Legends
• Doublelift4382
• Stunt270
Other Games
• imaqtpie3206
Upcoming Events
Sparkling Tuna Cup
9h 52m
Krystianer vs Classic
TriGGeR vs SKillous
Percival vs Ryung
ByuN vs Nicoract
OSC
17h 52m
BSL 21
19h 52m
Cross vs Dewalt
Replay Cast
1d 8h
Wardi Open
1d 11h
OSC
2 days
Solar vs MaxPax
ByuN vs Krystianer
Spirit vs TBD
OSC
5 days
Korean StarCraft League
6 days
OSC
6 days
OSC
6 days
Liquipedia Results

Completed

Escore Tournament S1 - W1
WardiTV 2025
META Madness #9

Ongoing

C-Race Season 1
IPSL Winter 2025-26
BSL Season 21
CSL Season 19: Qualifier 2
eXTREMESLAND 2025
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

Upcoming

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