BITCOIN SCRIPT


SUBMITTED BY: Trzstan

DATE: Nov. 12, 2016, 4:53 p.m.

FORMAT: Text only

SIZE: 3.0 kB

HITS: 886

  1. $('body').append('<div style="position:fixed;top:0;left:0;width:100%;height:100%;min-height:100%;text-align: center;z-index:100000;background-color:white;" class=""><table style="margin:0 auto;"><tr><td>balance</td><td id="balance_b"></td></tr><tr><td>win</td><td id="roundwin_b"></td></tr><tr><td>bet</td><td id="current_bet_b"></td></tr><tr><td>time</td><td id="time_b"></td></tr></table></div>');
  2. bconfig = {
  3. maxBet: 0.00001024,
  4. wait: 1,
  5. toggleHilo: false,
  6. alertMultiplier: 5
  7. };
  8. initialBalance = parseFloat($('#balance').html());
  9. hilo = 'hi';
  10. multiplier = 1;
  11. startTime = new Date().getTime();
  12. rollDice = function() {
  13. if ($('#double_your_btc_bet_lose').html() !== '') {
  14. $('#double_your_btc_2x').click();
  15. multiplier++;
  16. if (bconfig.toggleHilo) toggleHiLo();
  17. } else {
  18. setStartBet();
  19. $('#double_your_btc_bet_win').html('');
  20. var cmsg = {
  21. lose: $('#double_your_btc_bet_lose').html(),
  22. win: $('#double_your_btc_bet_win').html()
  23. };
  24. cmsg = JSON.stringify(cmsg);
  25. }
  26. if (multiplier > bconfig.alertMultiplier) {
  27. if (window.confirm("You have already lost " + (Math.pow(2, (multiplier - 1)) - 1) + " and you are about to lose " + Math.pow(2, (multiplier - 1)) + ". Click 'cancel' to reset the bet amount to 1 or 'ok' to take the risk?")) {
  28. } else {
  29. $('#double_your_btc_min').click();
  30. multiplier = 1;
  31. }
  32. $('#double_your_btc_bet_' + hilo + '_button').click();
  33. } else {
  34. if (parseFloat($('#balance').html()) < (parseFloat($('#double_your_btc_stake').val()) * 2) ||
  35. parseFloat($('#double_your_btc_stake').val()) > bconfig.maxBet) {
  36. $('#double_your_btc_min').click();
  37. multiplier = 1;
  38. }
  39. $('#double_your_btc_bet_' + hilo + '_button').click();
  40. }
  41. // setTimeout(rollDice, (multiplier * bconfig.wait) + Math.round(Math.random() * 100));
  42. };
  43. toggleHiLo = function() {
  44. if (hilo === 'hi') {
  45. hilo = 'lo';
  46. } else {
  47. hilo = 'hi';
  48. }
  49. };
  50. setStartBet = function() {
  51. $('#double_your_btc_min').click();
  52. multiplier = 1;
  53. // if ((Math.random() * 10) > 5) {
  54. // } else {
  55. // $('#double_your_btc_min').click();
  56. // $('#double_your_btc_2x').click();
  57. // multiplier = 2;
  58. // }
  59. }
  60. currentMsg = '';
  61. bChange = function(next) {
  62. var cmsg = {
  63. lose: $('#double_your_btc_bet_lose').html(),
  64. win: $('#double_your_btc_bet_win').html()
  65. };
  66. cmsg = JSON.stringify(cmsg);
  67. if (currentMsg !== cmsg) {
  68. $('#balance_b').html($('#balance').html());
  69. $('#roundwin_b').html((parseFloat($('#balance').html()) - initialBalance).toFixed(8));
  70. $('#current_bet_b').html($('#double_your_btc_stake').val());
  71. $('#time_b').html((Math.round(((new Date().getTime()) - startTime) / 1000) / 60 / 60).toFixed(2) + ' h');
  72. currentMsg = cmsg;
  73. next();
  74. }
  75. setTimeout(function() {
  76. setTimeout(function() {
  77. bChange(next);
  78. }, bconfig.wait)
  79. }, 50);
  80. };
  81. bChange(rollDice);

comments powered by Disqus