Last active
August 29, 2015 13:57
-
-
Save Saturate/9911339 to your computer and use it in GitHub Desktop.
Unicoin StackOverflow Auto Miner
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
// How to use it: | |
// Copy paste to your console (Press F12), and run it (Enter)! | |
// Now you are rich! Or soon... | |
var fkey = StackExchange.options.user.fkey || $("input[name=fkey]").val(); // I have no idea what the fkey is | |
var totalCoinsMined = 0; | |
console.log('Your fkey is: ' + fkey); | |
var mineSomeUnicoins = function() { | |
var responseTime = Math.floor(Math.random()*(12000-10000+1)+10000); // Get a random number | |
$.get("/unicoin/rock").done(function (e, d) { | |
console.log('Mine: ' + e.rock + ' in ' + responseTime + 'ms'); | |
setTimeout(function() { | |
$.post("/unicoin/mine?rock=" + e.rock, { | |
'fkey': fkey | |
}).done(function (t) { | |
totalCoinsMined = t.value + totalCoinsMined; | |
console.log('mined ' + t.value + ' unicoins (' +totalCoinsMined +' total)'); | |
mineSomeUnicoins(); // Do it again! | |
}); | |
}, responseTime); | |
}); | |
}; | |
// Start mining | |
mineSomeUnicoins(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment