coinwalk

freebitcoin random seed

Nov 9th, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.03 KB | None | 0 0
  1. var startValue = '0.00000001', // Don't lower the decimal point more than 4x of current balance
  2. maxWait = 777,
  3. max = 1000
  4. min = 0
  5. stopPercentage = 100
  6. stopped = false, // debugging
  7. stopBefore = 1; // In minutes for timer before stopping redirect on webpage
  8. var $loButton = $('#double_your_btc_bet_lo_button'),
  9. $hiButton = $('#double_your_btc_bet_hi_button');
  10. function multiply(){
  11. var current = $('#double_your_btc_stake').val();
  12. var multiply = (current * 2).toFixed(8);
  13. $('#double_your_btc_stake').val(multiply);
  14. }
  15. function getRandomWait(){
  16. document.getElementById("next_client_seed").value = client_seed();
  17. var wait = Math.floor(Math.random() * maxWait ) + 100;
  18. console.log('Waiting for ' + wait + 'ms before next bet.');
  19. return wait ;
  20. }
  21. function client_seed() {
  22. var text = "";
  23. var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  24.  
  25. for (var i = 0; i < 128; i++)
  26. text += possible.charAt(Math.floor(Math.random() * possible.length));
  27.  
  28. return text;
  29. }
  30. function Random_integer(min, max) {
  31. return Math.floor(Math.random() * (max - min + 1)) + min;
  32. }
  33. function startGame()
  34. {
  35. console.log('Game started!');
  36. reset();
  37. document.getElementById("next_client_seed").value = client_seed();
  38. $loButton.trigger('click');
  39. }
  40. function stopGame(){
  41. console.log('Game will stop soon! Let me finish.');
  42. stopped = true;
  43. }
  44. function reset(){
  45. document.getElementById("next_client_seed").value = client_seed();
  46. $('#double_your_btc_stake').val(startValue);
  47. }
  48. function deexponentize(number){
  49. return number * 10000000;
  50. }
  51. function iHaveEnoughMoni(){
  52. document.getElementById("next_client_seed").value = client_seed();
  53. var balance = deexponentize(parseFloat($('#balance').text()));
  54. var current = deexponentize($('#double_your_btc_stake').val());
  55. return ((balance)*2/100) * (current*2) > stopPercentage/100;
  56. }
  57. function stopBeforeRedirect(){
  58. var minutes = parseInt($('title').text());
  59. if( minutes < stopBefore )
  60. {
  61. console.log('Approaching redirect! Stop the game so we don\'t get redirected while loosing.');
  62. stopGame();
  63. return true;
  64. }
  65. return false;
  66. }
  67. document.getElementById("next_client_seed").value = client_seed();
  68. $('#double_your_btc_bet_lose').unbind();
  69. $('#double_your_btc_bet_win').unbind();
  70. $('#double_your_btc_bet_lose').bind("DOMSubtreeModified",function(event){
  71. if( $(event.currentTarget).is(':contains("lose")') )
  72. {
  73. console.log('You LOST! Multiplying your bet and betting again.');
  74. multiply();
  75. setTimeout(function(){
  76. $loButton.trigger('click');
  77. }, getRandomWait());
  78. }
  79. });
  80. $('#double_your_btc_bet_win').bind("DOMSubtreeModified",function(event){
  81. if( $(event.currentTarget).is(':contains("win")') )
  82. {
  83. if( stopBeforeRedirect() )
  84. {
  85. return;
  86. }
  87. if( iHaveEnoughMoni() )
  88. {
  89. console.log('You WON! But don\'t be greedy. Restarting!');
  90. reset();
  91. if( stopped )
  92. {
  93. stopped = false;
  94. return false;
  95. }
  96. }
  97. else
  98. {
  99. console.log('You WON! Betting again');
  100. }
  101. setTimeout(function(){
  102. $loButton.trigger('click');
  103. }, getRandomWait());
  104. }
  105. });startGame()
Add Comment
Please, Sign In to add comment