• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 20:20
CEST 02:20
KST 09:20
  • 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
Code S RO12 Preview: GuMiho, Bunny, SHIN, ByuN3The Memories We Share - Facing the Final(?) GSL39Code S RO12 Preview: Cure, Zoun, Solar, Creator4[ASL19] Finals Preview: Daunting Task30[ASL19] Ro4 Recap : The Peak15
Community News
Code S RO12 Results + RO8 Groups (2025 Season 2)3Weekly Cups (May 19-25): Hindsight is 20/20?0DreamHack Dallas 2025 - Official Replay Pack8[BSL20] RO20 Group Stage3EWC 2025 Regional Qualifiers (May 28-June 1)71
StarCraft 2
General
The SCII GOAT: A statistical Evaluation The Memories We Share - Facing the Final(?) GSL Is there a place to provide feedback for maps? Code S RO12 Results + RO8 Groups (2025 Season 2) CN community: Firefly accused of suspicious activities
Tourneys
EWC 2025 Regional Qualifiers (May 28-June 1) WardiTV Mondays RSL: Revival, a new crowdfunded tournament series DreamHack Dallas 2025 Last Chance Qualifiers for OlimoLeague 2024 Winter
Strategy
[G] Darkgrid Layout Simple Questions Simple Answers [G] PvT Cheese: 13 Gate Proxy Robo
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 476 Charnel House Mutation # 475 Hard Target Mutation # 474 Futile Resistance Mutation # 473 Cold is the Void
Brood War
General
Will foreigners ever be able to challenge Koreans? BW General Discussion BGH auto balance -> http://bghmmr.eu/ Battle.net is not working Which player typ excels at which race or match up?
Tourneys
[ASL19] Grand Finals [BSL20] RO20 Group Stage [BSL20] RO20 Group D - Sunday 20:00 CET [BSL 2v2] ProLeague Season 3 - Friday 21:00 CET
Strategy
[G] How to get started on ladder as a new Z player I am doing this better than progamers do.
Other Games
General Games
Mechabellum Monster Hunter Wilds Path of Exile Nintendo Switch Thread Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
LiquidLegends to reintegrate into TL.net
Heroes of the Storm
Simple Questions, Simple Answers
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia TL Mafia Community Thread TL Mafia Plays: Diplomacy TL Mafia: Generative Agents Showdown Survivor II: The Amazon
Community
General
Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Canadian Politics Mega-thread YouTube Thread US Politics Mega-thread
Fan Clubs
Serral Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion!
Sports
Formula 1 Discussion 2024 - 2025 Football Thread NHL Playoffs 2024 NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Cleaning My Mechanical Keyboard How to clean a TTe Thermaltake keyboard?
TL Community
The Automated Ban List TL.net Ten Commandments
Blogs
Research study on team perfo…
TrAiDoS
I was completely wrong ab…
jameswatts
Need Your Help/Advice
Glider
Trip to the Zoo
micronesia
Poker
Nebuchad
Info SLEgma_12
SLEgma_12
SECOND COMMING
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 17121 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 23h 40m
[ Submit Event ]
Live Streams
Refresh
StarCraft: Brood War
Artosis 987
MaD[AoV]52
Icarus 4
Counter-Strike
fl0m1599
Stewie2K979
Super Smash Bros
Mew2King388
Heroes of the Storm
Khaldor238
Other Games
tarik_tv9694
summit1g9034
FrodaN6425
shahzam567
JimRising 547
Maynarde288
ViBE286
Organizations
Other Games
gamesdonequick1260
BasetradeTV26
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• Berry_CruncH301
• Hupsaiya 66
• davetesta41
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• masondota23005
Other Games
• imaqtpie1952
Upcoming Events
Replay Cast
23h 40m
Replay Cast
1d 9h
PiGosaur Monday
1d 23h
Bellum Gens Elite
2 days
The PondCast
3 days
Bellum Gens Elite
3 days
Replay Cast
3 days
Bellum Gens Elite
4 days
Replay Cast
4 days
CranKy Ducklings
5 days
[ Show More ]
SC Evo League
5 days
Bellum Gens Elite
5 days
Replay Cast
5 days
SOOP
6 days
Sparkling Tuna Cup
6 days
AllThingsProtoss
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2025-05-28
DreamHack Dallas 2025
Calamity Stars S2

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
KCM Race Survival 2025 Season 2
NPSL S3
Rose Open S1
CSL Season 17: Qualifier 1
2025 GSL S2
Heroes 10 EU
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
ECL Season 49: Europe
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025
YaLLa Compass Qatar 2025
PGL Bucharest 2025
BLAST Open Spring 2025

Upcoming

CSL Season 17: Qualifier 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
CSLPRO Last Chance 2025
CSLAN 2025
K-Championship
SEL Season 2 Championship
Esports World Cup 2025
HSC XXVII
Championship of Russia 2025
Bellum Gens Elite Stara Zagora 2025
Murky Cup #2
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 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.