Satoshimines bot

Bet 105% each time, one bet.

  1. // ==UserScript==
  2. // @name Satoshimines bot
  3. // @namespace Hash G.
  4. // @description Bet 105% each time, one bet.
  5. // @include *satoshimines.com*
  6. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
  7. // @version 1.1
  8. // @grant GM_getValue
  9. // @grant GM_setValue
  10. // @grant GM_deleteValue
  11. // @grant GM_xmlhttpRequest
  12. // ==/UserScript==
  13.  
  14. $("#bet").parent().attr("class", "c40 cell");
  15. $("#start_game").parent().attr("class", "c30 cell");
  16. $("#start_game").parent().parent().append("<div class='c30 cell'><button onClick='startBot()' id='startBot'>Start bot</button></div>");
  17. var interval;
  18.  
  19. function startBot() {
  20. GM_setValue("initialBalance", $(".num").html());
  21. $("#startBot").attr("onClick", "stopBot()");
  22. $("#startBot").html("Stop bot");
  23. interval = window.setInterval(function(){
  24. $("div[id^=game]").remove();
  25. var bet = $("#bet").val();
  26. var mines = $(".mine_options").find("button[class='active']").html();
  27. mines = mines.substring(39);
  28. var tile = Math.floor((Math.random() * 25) + 1);
  29. console.log("=========STARTING GAME=========\nBalance: " + $(".num").html() + "\nBet: " + bet + "\nMines: " + mines + "\nTile: " + tile);
  30. $("#start_game").click();
  31. setTimeout(function(){ $('li.tile:nth-child('+tile+')').click(); }, 500);
  32. setTimeout(function(){ $(".cashout").click(); }, 700);
  33. $("#bet").attr("value", Math.round(bet * 1.05));
  34. if ($(".num").html() >= GM_getValue("initialBalance", "") * 2) {
  35. clearInterval(interval);
  36. }
  37. }, 1500);
  38. }
  39. exportFunction(startBot, unsafeWindow, {defineAs: "startBot"});
  40.  
  41. function stopBot() {
  42. $("#startBot").attr("onClick", "startBot()");
  43. $("#startBot").html("Start bot");
  44. clearInterval(interval);
  45. }
  46. exportFunction(stopBot, unsafeWindow, {defineAs: "stopBot"});