Untitled


SUBMITTED BY: Guest

DATE: Sept. 21, 2013, 9:55 p.m.

FORMAT: Text only

SIZE: 4.8 kB

HITS: 1633

  1. var lastmessage = 0,
  2. autobet_speed = 0,
  3. normalbet_speed = 0,
  4. id = 0,
  5. timedCount, timer, lastYourBet = 0,
  6. lastAllBet = 0,
  7. lastBigBet = 0,
  8. autobet_halt, first_load = true,
  9. autobet_index = false,
  10. prev_balance = 0,
  11. bet_ids = [];
  12. function bet(bet, odds, type, callback) {
  13. $.ajax({
  14. url: '/api/bet.php',
  15. type: 'post',
  16. data: {
  17. 'bet': bet,
  18. 'game': odds,
  19. 'type': type == 0 ? 1 : 0,
  20. },
  21. dataType: 'json',
  22. success: function (data) {
  23. if (data.error) {
  24. autobet_halt = true;
  25. return;
  26. }
  27. },
  28. error: function (jqXHR) {
  29. autobet_halt = true;
  30. },
  31. complete: function (jqXHR) {
  32. var data;
  33. try {
  34. data = $.parseJSON(jqXHR.responseText);
  35. } catch (e) {
  36. data = false;
  37. }
  38. if (typeof callback === 'function') {
  39. callback(data);
  40. }
  41. }
  42. });
  43. }
  44. function auto_bet(params) {
  45. setTimeout(function () {
  46. var current_balance = parseFloat($('#balance-value').text());
  47. if (current_balance === 0)
  48. {
  49. autobet_index = false;
  50. return;
  51. }
  52. else if(params.current_bet > current_balance)
  53. params.current_bet = current_balance;
  54. bet(params.current_bet, params.odds, params.type, function (data) {
  55. var i, a, j, curbet;
  56. if (data) {
  57. params.current_run++;
  58. autobet_index = params.current_run;
  59. if (data.result == 0) {
  60. if (params.on_loss_return) {
  61. params.current_bet = params.bet;
  62. } else {
  63. params.current_bet *= params.on_loss_multiply;
  64. }
  65. } else {
  66. if (params.on_win_return) {
  67. params.current_bet = params.bet;
  68. } else {
  69. params.current_bet *= params.on_win_multiply;
  70. }
  71. }
  72. curbet = params.current_bet.toString();
  73. if (curbet.indexOf('e') > -1) {
  74. i = parseInt(curbet.substr(0, curbet.indexOf('e')).replace('.', ''));
  75. a = parseInt(curbet.substr(curbet.indexOf('e') + 2));
  76. curbet = i.toString();
  77. for (j = 1; j < a; j++) {
  78. curbet = '0' + curbet;
  79. }
  80. params.current_bet = '0.' + curbet;
  81. }
  82. params.current_bet = +('' + params.current_bet).substr(0, ('' + params.current_bet).indexOf('.') + 9);
  83. if (data.balance < data.current_bet) {
  84. return;
  85. }
  86. }
  87. if (params.current_run < params.total_runs) {
  88. if(params.current_bet < params.bet)
  89. params.current_bet = params.bet;
  90. auto_bet(params);
  91. } else {
  92. params.current_bet = params.bet;
  93. autobet_index = false;
  94. auto_bet(params);
  95. return;
  96. }
  97. })
  98. }, autobet_speed);
  99. }
  100. params = {
  101. odds: 20.81,
  102. type: 0,
  103. bet: 0.00000002,
  104. total_runs: 2147483647,
  105. on_loss_return: false,
  106. on_loss_multiply: false,
  107. on_win_return: false,
  108. on_win_multiply: false,
  109. current_run: 0,
  110. current_bet: 0,
  111. };
  112. params.current_bet = params.bet;
  113. autobet_halt = false;
  114. autobet_index = 0;
  115. auto_bet(params);

comments powered by Disqus