Advertisement
coinwalk

lol trial

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