Advertisement
coinwalk

sucks

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