Created
September 23, 2014 06:55
-
-
Save Alexx-G/5965e8a7e2bd8d508837 to your computer and use it in GitHub Desktop.
Game hack ( http://game.ioxapp.com/color/ )
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
function searchBox() { | |
var box = $("#box"); | |
if (box.length > 0) { | |
var elements = box.find("span"); | |
var lvl = box.attr("class"); | |
for(var i = 0; i < elements.length - 1; i++) { | |
if($(elements[i]).attr("style") != $(elements[i + 1]).attr("style")) { | |
$(elements[i]).click(); | |
if(lvl == box.attr("class")) { | |
$(elements[i + 1]).click(); | |
} | |
break; | |
} | |
} | |
if(!$("#dialog").is(":visible")) { | |
window.setTimeout(searchBox, Math.floor(Math.random() * 500) + 1); | |
} | |
} | |
}; |
Nice.
I didn't look at the source code of the game. I just opened inspector and wrote this function (and I copied the code as-is in this gist, without any refactoring).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dude, try this) setInterval(function(){Game.nextLv()},1)