sample


SUBMITTED BY: roxybarua

DATE: Sept. 16, 2016, 4:36 p.m.

FORMAT: Text only

SIZE: 1.8 kB

HITS: 2727

  1. startValue = '0.00000001', // Don't lower the decimal point more than 4x of current balance
  2. stopPercentage = 0.001, // In %. I wouldn't recommend going past 0.08
  3. maxWait = 500, // In milliseconds
  4. stopped = false,
  5. stopBefore = 3; // 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(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 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 = true;
  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.0000001
  31. function deexponentize(number){
  32. return number * 1000000;
  33. }
  34. function iHaveEnoughMoni(){
  35. var balance = deexponentize(parseFloat($('#balance').text()));
  36. var current = deexponentize($('#double_your_btc_stake').val());
  37. return ((balance*2)/100) * (current*2) > stopPercentage/100;
  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;

comments powered by Disqus