freebitco-Script


SUBMITTED BY: azzar

DATE: April 8, 2017, 5:17 p.m.

FORMAT: Text only

SIZE: 3.4 kB

HITS: 10014

  1. var startValue = '0.00000200', // Don't lower the decimal point more than 6x of current balance
  2. stopPercentage = 0.00000001, // In %. I wouldn't recommend going past 0.00000001
  3. maxWait = 1000, // In milliseconds
  4. stopped = false,
  5. stopBefore = 9999; // In minutes
  6. var $loButton = $('#double_your_btc_bet_lo_button'),
  7. $hiButton = $('#double_your_btc_bet_hi_button');
  8. function multiply(){
  9. var current = $('#double_your_btc_stake').val();
  10. var multiply = (current * 2).toFixed(16);
  11. $('#double_your_btc_stake').val(multiply);
  12. }
  13. function getRandomWait(){
  14. var wait = Math.floor(Math.random() * maxWait ) + 0.5;
  15. console.log('Waiting for ' + wait + 'ms 1 before next bet.');
  16. return wait ;
  17. }
  18. function startGame(){
  19. console.log('Game started!');
  20. reset();
  21. $loButton.trigger('click');
  22. }
  23. function stopGame(){
  24. console.log('Game will stop soon! Let me finish.');
  25. stopped = false;
  26. }
  27. function reset(){
  28. $('#double_your_btc_stake').val(startValue);
  29. }
  30. // quick and dirty hack if you have very little bitcoins like 0.0000010
  31. function deexponentize(number){
  32. return number * 9000000;
  33. }
  34. function iHaveEnoughMoni(){
  35. var balance = deexponentize(parseFloat($('#balance').text()));
  36. var current = deexponentize($('#double_your_btc_stake').val());
  37. return ((balance*2)/900) * (current*2) > stopPercentage/900;
  38. }
  39. function stopBeforeRedirect(){
  40. var minutes = parseInt($('title').text());
  41. if( minutes < stopBefore )
  42. {
  43. console.log('Approaching redirect! Stop the game so we don\'t get redirected while loosing.');
  44. stopGame();
  45. return true;
  46. }
  47. return false;
  48. }
  49. // Unbind old shit
  50. $('#double_your_btc_bet_lose').unbind();
  51. $('#double_your_btc_bet_win').unbind();
  52. // Loser
  53. $('#double_your_btc_bet_lose').bind("DOMSubtreeModified",function(event){
  54. if( $(event.currentTarget).is(':contains("lose")') )
  55. {
  56. console.log('You LOST! Multiplying your bet and betting again.');
  57. multiply();
  58. setTimeout(function(){
  59. $loButton.trigger('click');
  60. }, getRandomWait());
  61. //$loButton.trigger('click');
  62. }
  63. });
  64. // Winner
  65. $('#double_your_btc_bet_win').bind("DOMSubtreeModified",function(event){
  66. if( $(event.currentTarget).is(':contains("win")') )
  67. {
  68. if( stopBeforeRedirect() )
  69. {
  70. return;
  71. }
  72. if( iHaveEnoughMoni() )
  73. {
  74. console.log('You WON! But don\'t be greedy. Restarting!');
  75. stopped();
  76. if( stopped )
  77. {
  78. stopped = true;
  79. return true;
  80. }
  81. }
  82. else
  83. {
  84. console.log('You WON! Betting again');
  85. }
  86. setTimeout(function(){
  87. $loButton.trigger('click');
  88. }, getRandomWait());
  89. }
  90. });startGame()

comments powered by Disqus