Jump to content

Playing Chrome Dino Game with Autoit - (Locked)

Recommended Posts

HELP, I'm new to autoit and I'm trying to use it to play the chrome dino game. I can get my score to about 700 fairly consistently but the issue arises when I the game switches to night mode. When this happens it fades into night, so my checksums temporarily stop working. During the time they stop working I always die and I don't have a solution, I've been trying for 4 days now and I can't figure it out. Here is my code. I really appreciate your time.

Run("C:\Program Files\Google\Chrome\Application\chrome.exe") ;opens dino game
WinWait("New Tab - Google Chrome")

MsgBox(0, "IMPORTANT", "To end the program press DELETE") ;sets delete as hot key to end program
HotKeySet("{DELETE}", "Endprogram")

$eyesite = 500 ;how far forward the dino sees infront of it

While 1
    Send("{space up}") ;unpresses all keys
    send("{DOWN up}")

$checkforcactus = PixelChecksum(293,609 ,$eyesite,655) ;the checksums
$checkforbird = PixelChecksum(250,530 ,$eyesite ,541)

If $checkforbird <> PixelChecksum(250,530 ,$eyesite,541) Then ;checks for birds
        Send("{DOWN down}")
        $checkforbird = PixelChecksum(250,530 ,$eyesite,541)
        $eyesite = $eyesite + 4


If $checkforcactus <> PixelChecksum(293,609 ,$eyesite,655) Then ; checks for cactus

    Send("{space down}")
    $eyesite = $eyesite + 4
    $checkforcactus = PixelChecksum(293,609 ,$eyesite,655)


Func Endprogram()



Link to post
Share on other sites
  • Developers

Welcome to the AutoIt forum.

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

See you soon with a legitimate question I hope.

The Moderation team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
Live for the present,
Dream of the future,
Learn from the past.

Link to post
Share on other sites
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...