JavaScript. Beat RandomWithRandon. Freebitco.in


SUBMITTED BY: godsend

DATE: Nov. 25, 2020, 3:49 a.m.

UPDATED: Feb. 12, 2021, 4:09 p.m.

FORMAT: Text only

SIZE: 4.4 kB

HITS: 944

  1. var startValue = '0.00000002', // Don't lower the decimal point more than 4x of current balance
  2. stopPercentage = 0.00000100, // In %. I wouldn't recommend going past 0.08 and initial per 0.0001
  3. stopLossVal = 0.00001000;//stop loss value
  4. maxWait = 540, // In milliseconds, 554 my magic key as high wining ration
  5. stopped = false,
  6. fixedHiLo = 0, //0 random, 1 hi fixed, 2 lo fixed
  7. stopBefore = 5; // In minutes
  8. var accu = 0, contLoseCnt = 0, maxLose = 0, winCnt = 0, loseCnt = 0, winRatio = 0.0, hilo = 1;//1 : hi, 0:lo
  9. var $loButton = $('#double_your_btc_bet_lo_button'), $hiButton = $('#double_your_btc_bet_hi_button');
  10. function multiply(){
  11. var current = $('#double_your_btc_stake').val();
  12. var multiply = (current * 2.2).toFixed(8);
  13. $('#double_your_btc_stake').val(multiply);
  14. }
  15. function getRandomWait(){
  16. var wait = Math.floor(Math.random() * maxWait ) + 100;
  17. // console.log('Waiting for ' + wait + 'ms before next bet.');
  18. return wait ;
  19. }
  20. function getHilo(){
  21. if(fixedHiLo == 1){
  22. hilo = 1; //hi
  23. }else if(fixedHiLo == 2){
  24. hilo = 0; //lo
  25. }else {
  26. hilo = Math.floor(Math.random() * 2);//random
  27. }
  28. return hilo ;
  29. }
  30. function rollDice(){
  31. console.log('Game started!');
  32. reset();
  33. if (getHilo() == 1) {
  34. $hiButton.trigger('click');
  35. } else {
  36. $hiButton.trigger('click');
  37. }
  38. }
  39. function stopGame(){
  40. console.log('IAN M TAMVAN MAX :-).');
  41. stopped = true;
  42. }
  43. function reset(){
  44. $('#double_your_btc_stake').val(startValue);
  45. }
  46. // quick and dirty hack if you have very little bitcoins like 0.0000001
  47. function deexponentize(number){
  48. return number * 1000000;
  49. }
  50. function iHaveEnoughMoni(){
  51. var balance = deexponentize(parseFloat($('#balance').text()));
  52. var current = deexponentize($('#double_your_btc_stake').val());
  53. // console.log("balance : "+balance);console.log("current : "+current);
  54. return ((balance*2)/100) * (current*2) > stopPercentage/100;
  55. }
  56. function stopBeforeRedirect(){
  57. var minutes = parseInt($('title').text());
  58. if( minutes < stopBefore ) {
  59. console.log('Approaching redirect! Stop the game so we don\'t get redirected while loosing.');
  60. stopGame();
  61. return true;
  62. }
  63. return false;
  64. }
  65. // Unbind old shit
  66. $('#double_your_btc_bet_lose').unbind();
  67. $('#double_your_btc_bet_win').unbind();
  68. // Loser
  69. $('#double_your_btc_bet_lose').bind("DOMSubtreeModified",function(event){
  70. if( $(event.currentTarget).is(':contains("lose")') )
  71. {
  72. maxLose += 1;
  73. loseCnt += 1;
  74. if(maxLose > contLoseCnt) {contLoseCnt = maxLose;}
  75. winRatio = ((winCnt / (winCnt+loseCnt))*100).toFixed(2);
  76. accu -= parseFloat($('#double_your_btc_stake').val());
  77. console.log('Stop Lose Bangke!'+' cumulative : '+(accu).toFixed(8)+' odds : '+winRatio+'%'+' cont lose : '+contLoseCnt);
  78. multiply();
  79. if (getHilo() == 1) {
  80. setTimeout(function(){
  81. $loButton.trigger('click');
  82. }, getRandomWait());
  83. } else {
  84. setTimeout(function(){
  85. $hiButton.trigger('click');
  86. }, getRandomWait());
  87. }
  88. }
  89. });
  90. // Winner
  91. $('#double_your_btc_bet_win').bind("DOMSubtreeModified",function(event) {
  92. if( $(event.currentTarget).is(':contains("win")') ) {
  93. if( stopBeforeRedirect()) {
  94. return;
  95. }
  96. maxLose = 0 ;
  97. accu += parseFloat($('#double_your_btc_stake').val());
  98. if( iHaveEnoughMoni()) {
  99. winCnt += 1;
  100. winRatio = ((winCnt / (winCnt+loseCnt))*100).toFixed(2);
  101. console.log('Ian M TamVan'+' cumulative : '+(accu).toFixed(8)+' odds : '+winRatio+'%'+' cont lose : '+contLoseCnt);
  102. reset();
  103. if( stopped) {
  104. stopped = false;
  105. return false;
  106. }
  107. } else {//reset
  108. winCnt += 1;
  109. winRatio = ((winCnt / (winCnt+loseCnt))*100).toFixed(2);
  110. console.log('Ian M TamVan Total'+' cumulative : '+(accu).toFixed(8)+' odds : '+winRatio+'%'+' cont lose : '+contLoseCnt);
  111. winCnt = 0, loseCnt = 0, winRatio = 0.0;
  112. }
  113. if (getHilo() == 1) {
  114. setTimeout(function(){
  115. $loButton.trigger('click');
  116. }, getRandomWait());
  117. //hilo = 0;
  118. }else {
  119. setTimeout(function(){
  120. $hiButton.trigger('click');
  121. }, getRandomWait());
  122. //hilo = 1;
  123. }
  124. }
  125. });rollDice();

comments powered by Disqus