Skip to content

Instantly share code, notes, and snippets.

@cincauhangus
Last active January 3, 2016 02:29
Show Gist options
  • Select an option

  • Save cincauhangus/8395939 to your computer and use it in GitHub Desktop.

Select an option

Save cincauhangus/8395939 to your computer and use it in GitHub Desktop.
Clicking Bad Click ScriptHack
// 1. paste this code into console
// 2. type makeItHappen(1000, true, true) to start
// 3. type makeItStop() to stop at any time
function makeItStop () {
proceed = false;
}
function makeItHappen (clickTimes, make, sell, clickDelay) {
clickDelay = clickDelay || 70;
proceed = true;
make = make === null ? false : make;
sell = sell === null ? false : sell;
var welcome = "making "+clickTimes+" clicks on ";
if (make) welcome += "cook";
if (make && sell) welcome += " and ";
if (sell) welcome += "sell";
if (!make && !sell) welcome += "nothing";
console.log(welcome);
if (!make && !sell) return;
(function clickLoop ( i ) {
setTimeout(function () {
if (!proceed) {
console.log("clicking halted");
return false;
}
if ( make ) $("#make_btn")[0].click();
if ( sell ) $("#sell_btn")[0].click();
if (--i) {
clickLoop( i );
} else {
console.log("clicking completed");
}
}, clickDelay);
})(clickTimes);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment