Created
April 27, 2012 22:14
-
-
Save mohamedmansour/2513841 to your computer and use it in GitHub Desktop.
Cheat Code to defeat the Google Zerg Rush!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Mohamed Mansour 2012 http://mohamedmansour.com | |
var initEvent = function(element, str) { | |
var clickEvent = document.createEvent('MouseEvents'); | |
clickEvent.initEvent(str, true, true); | |
element.dispatchEvent(clickEvent); | |
}; | |
var simulateClick = function(element) { | |
initEvent(element, 'mousedown'); | |
initEvent(element, 'click'); | |
initEvent(element, 'mouseup'); | |
}; | |
function defeatZerglings() { | |
var zerglings = document.querySelectorAll('.zr_zergling_container'); | |
if (zerglings.length != 0) { | |
for (var i = 0; i < zerglings.length; i++) { | |
simulateClick(zerglings[i]); | |
simulateClick(zerglings[i]); | |
simulateClick(zerglings[i]); | |
simulateClick(zerglings[i]); | |
} | |
} | |
var endGame = document.getElementById('zr_end_game'); | |
if (!endGame) { | |
setTimeout('defeatZerglings()', 500); | |
} | |
else { | |
alert('Automation completed, bots destroyed!'); | |
} | |
} | |
defeatZerglings(); |
Do u know how to give my account 1000 pounds to spend on games (xbox 1)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Dani21 the bookmarklet is here https://plus.google.com/116805285176805120365/posts/hGNK4DqQL1j the download link to drag the bookmarklet would be there