Freebit AI roll Multiply

Auto roll

  1. // ==UserScript==
  2. // @name Freebit AI roll Multiply
  3. // @namespace
  4. // @description Auto roll
  5. // @author ALEN
  6. // @include https://freebitco.in/*
  7. // @run-at document-end
  8. // @grant GM_addStyle
  9. // @grant GM_getResourceURL
  10. // @grant GM_xmlhttpRequest
  11. // @grant unsafeWindow
  12. // @version 2.7
  13. // @credit
  14. // @namespace https://greasyfork.org/users/937752
  15. // ==/UserScript==
  16. var timer = undefined;
  17. var counter = 0;
  18. var remain = 60*6;
  19. function try_roll()
  20. {
  21. var x = document.querySelector("#free_play_form_button"),
  22. myRP = document.getElementsByClassName("user_reward_points"),
  23. y = document.getElementById("bonus_container_free_lott"),
  24. z = document.getElementById("bonus_container_fp_bonus");
  25. console.log("Detect if we can roll");
  26. document.title="Can we roll?";
  27.  
  28. if(x && x.style["display"] != "none")
  29. {
  30. console.log("Rolling...");
  31. document.title="Rooling...";
  32. x.click();
  33. remain = 606;
  34. counter = 0;
  35. }
  36. }
  37. function count_up()
  38. {
  39. counter = counter + 1;
  40. if(counter >= remain)
  41. {
  42. location.reload();
  43. }
  44. try_roll();
  45. }
  46. function auto_roll()
  47. {
  48. if(document.location.href.indexOf("freebitco.in") == -1)
  49. return;
  50. try_roll();
  51. timer = setInterval(count_up, 101000); /* 1 minutes */
  52. }
  53. setTimeout(function(){
  54. auto_roll();
  55. }, 3000);
  56. var minstake = 0.00000100; // 基础值
  57. var autorounds = 30; // 次数
  58. var handbrake = 1.0000000; // 输掉时暂停游戏
  59. var autoruns = 1;
  60. var maxAttempts = 10; // 最大尝试次数
  61. var currentAttempts = 0; // 当前尝试次数
  62.  
  63. function playnow() {
  64. if (autoruns > autorounds) {
  65. console.log('已达到限制');
  66. return;
  67. }
  68. document.getElementById('double_your_btc_bet_hi_button').click();
  69. setTimeout(checkresults, 1000);
  70. return;
  71. }
  72.  
  73. function checkresults() {
  74. if (document.getElementById('double_your_btc_bet_hi_button').disabled === true) {
  75. setTimeout(checkresults, 1000);
  76. return;
  77. }
  78. var stake = document.getElementById('double_your_btc_stake').value * 1;
  79. var won = document.getElementById('double_your_btc_bet_win').innerHTML;
  80. if (won.match(/(\d+\.\d+)/) !== null) {
  81. won = won.match(/(\d+\.\d+)/)[0];
  82. } else {
  83. won = false;
  84. }
  85. var lost = document.getElementById('double_your_btc_bet_lose').innerHTML;
  86. if (lost.match(/(\d+\.\d+)/) !== null) {
  87. lost = lost.match(/(\d+\.\d+)/)[0];
  88. } else {
  89. lost = false;
  90. }
  91.  
  92. if (won && !lost) {
  93. stake = minstake;
  94. console.log('赌注 #' + autoruns + '/' + autorounds + ': 赢 ' + won + ' 赌注: ' + stake.toFixed(8));
  95. return; // 停止尝试转动
  96. }
  97. if (lost && !won) {
  98. stake = lost * 2.1;
  99. console.log('赌注 #' + autoruns + '/' + autorounds + ': 输了 ' + lost + ' 赌注: ' + stake.toFixed(8));
  100. }
  101. if (!won && !lost) {
  102. console.log('出现了问题');
  103. return;
  104. }
  105. document.getElementById('double_your_btc_stake').value = stake.toFixed(8);
  106. autoruns++;
  107. currentAttempts++; // 每次尝试后增加尝试次数
  108.  
  109. // 如果达到最大尝试次数,但仍未赢得游戏,继续尝试转动
  110. if (currentAttempts >= maxAttempts && !won) {
  111. console.log("已达到最大尝试次数,仍未赢得游戏,继续尝试转动。");
  112. autoruns = 1; // 重置尝试次数
  113. }
  114.  
  115. if (stake >= handbrake) {
  116. document.getElementById('handbrakealert').play();
  117. console.log('手刹触发!执行 playnow() 来覆盖');
  118. return;
  119. }
  120.  
  121. setTimeout(playnow, 1000);
  122. return;
  123. }
  124.  
  125. playnow();