4 ms·
I figured this would be easy to hack, and I was right: 1) Insert jQuery into the search results page by using this bookmarklet: javascript:void(function(){if(!
by martindale 14y ago
I figured this would be easy to hack, and I was right:
1) Insert jQuery into the search results page by using this bookmarklet:
javascript:void(function(){if(!document.getElementById('jQscript')){var%20jQscript=document.createElement('script');jQscript.id='jQscript';jQscript.src='https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js;document.documentElement.appendChild(jQscript);}}() https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.mi...);
2) use the console to execute the following, moving all zerglings to 250x250:
setInterval(function() {
$('.zr_zergling_container').css('left', '250px').css('top', '250px');
}, 50);
3) click away. #winning
- nostrademons 14y agoWhen we were code-reviewing it, we had a bunch of fun trying to hack it programmatically and sharing ridiculously high scores (things like 12,000 zerglings killed). It's not even as hard as you mention: you can simulate a mouseclick on all zergling divs programmatically, and instantly clear the screen of every wave. Then I went and just entered the code to pop up a ShareBox programmatically on the JS console, letting me edit the share message to whatever I wanted it to be. "I took down 1,853,642.93 zerglings with 3.14 * 10^42 APM." And I didn't even need to play the game!
- martindale 14y agoYeah, you had the fortunate ability to view the non-minified version. ;) My first approach was the mouseclick (using $('.zr_zergling_container').click()) but for whatever reason that wouldn't work. I got fed up and just decided to try moving the zerglings to a clickable location. Ha!
- hornd 14y agoHa, I spent a bit trying the same method, and it didn't work for me either. Didn't have the insight to move them though.
- petrosalema 14y agoI was able to rack up a score of 1032 actual zerg kills (https://plus.google.com/u/0/105804947146425070365/posts/LKju7M6d7kg https://plus.google.com/u/0/105804947146425070365/posts/LKju...) using simulated mouse clicks on the zerglings. It's not that hard: https://gist.github.com/2514407 https://gist.github.com/2514407 . There are relatively simple guards one could engineer into the zerg rush program to prevent simple hacks like this though, if one cared to. Fun stuff!
- martindale 14y agoI showed my good friend my approach, he came up with this: https://gist.github.com/2513841 https://gist.github.com/2513841
- petrosalema 14y agoNice :D