Last active
January 3, 2016 02:29
-
-
Save cincauhangus/8395939 to your computer and use it in GitHub Desktop.
Clicking Bad Click ScriptHack
This file contains hidden or 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
| // 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