Bitcoin generator script


SUBMITTED BY: Samile

DATE: Jan. 27, 2017, 11:09 a.m.

FORMAT: Text only

SIZE: 1.9 kB

HITS: 316

  1. Bitcoin generator script.
  2. var startValue = '0.00000001', // Don't lower the decimal point more than 4x of current balance
  3. stopPercentage = 0.001, // In %. I wouldn't recommend going past 0.08
  4. maxWait = 500, // In milliseconds
  5. stopped = false,
  6. stopBefore = 3; // In minutes
  7. var $loButton = $('#double_your_btc_bet_lo_button'),
  8. $hiButton = $('#double_your_btc_bet_hi_button');
  9. function multiply(){
  10. var current = $('#double_your_btc_stake').val();
  11. var multiply = (current * 2).toFixed(8);
  12. $('#double_your_btc_stake').val(multiply);
  13. }
  14. function getRandomWait(){
  15. var wait = Math.floor(Math.random() * maxWait ) + 100;
  16. console.log('Waiting for ' + wait + 'ms before next bet.');
  17. return wait ;
  18. }
  19. function startGame(){
  20. console.log('Game started!');
  21. reset();
  22. $loButton.trigger('click');
  23. }
  24. function stopGame(){
  25. console.log('Game will stop soon! Let me finish.');
  26. stopped = true;
  27. }
  28. function reset(){
  29. $('#double_your_btc_stake').val(startValue);
  30. }
  31. // quick and dirty hack if you have very little bitcoins like 0.0000001
  32. function deexponentize(number){
  33. return number * 1000000;
  34. }
  35. function iHaveEnoughMoni(){
  36. var balance = deexponentize(parseFloat($('#balance').text()));
  37. var current = deexponentize($('#double_your_btc_stake').val());
  38. return ((balance*2)/100) * (current*2) > stopPercentage/100;
  39. }
  40. function stopBeforeRedirect(){
  41. var minutes = parseInt($('title').text());
  42. if( minutes < stopBefore )
  43. {
  44. console.log('Approaching redirect! Stop the game so we don\'t get redirected while loosing.');
  45. stopGame();
  46. return true;
  47. }
  48. return false;
  49. }
  50. // Unbind old shit

comments powered by Disqus