markhuge MH\n s

Infinite Overwatch bots with Go


signed with 0x683A22F9469CA4EB


There was a bug in Overwatch that made the game fun. Blizzard just uninstalled the fun, so now I can probably post this without getting banned.

The bug was a race condition in the custom games UI, that would allow for moving AI players into teams that were already full. Exploiting the bug was pretty simple, you just had to click quickly enough to cause the collision.


I’m lazy and I cheat at cookie clicker, so I decided to write a thing to automate the exploit. I used Go because I needed a Windows binary, and didn’t want to hand craft XML and setup like 3GB of NuGet bullshit to click the screen.

The first cross platform lib I found for mouse input was

For some reason the lib is limited to a single keypress event listener, and that listener can only reliably be triggered one time. My ego won’t let me acknowledge that Go is a poor choice for this problem, and I should have just written this in C#. I devise a shit workaround: start with a keypress, end with a mouse gesture.

Press 1 to start. If the mouse y position is > starting point + 500, exit.

This code is hot garbage, but it did the job:

package main

import (


var start, x, y int

// Add a random delay to behave more like human input
func delay() int {
	return rand.Intn(37-20) + 20

func main() {
	fmt.Println("Press 1 to start clicking. Move mouse to bottom of screen to stop clicking.")
	start = robotgo.AddEvent("1")
	x, y = robotgo.GetMousePos()
	if start == 1 {

func click() {
	for {
		time.Sleep(time.Duration(delay()) * time.Millisecond)
		_, newy := robotgo.GetMousePos()
		if y+500 < newy {
			fmt.Println("Got exit event")

For less than 8 mins of work, I’m pretty okay with this solution.

If I were solving this problem in days instead of minutes, I probably would have pulled a trinket from the pile and emulated a HID mouse to get around any potential cheat detection totally legitimate software conflicts.

About the Author

Mark Wilkerson


R&D engineer @ Twitch. Previously Blizzard, Hightail, Co-Founder @ SpeakUp

Mark is building open source tools to make web3 and decentralized self-ownership easy for regular people.

Live dev streams at

More Posts