Unlimited BTC primedice.com Hack


SUBMITTED BY: Guest

DATE: July 15, 2014, 6:33 p.m.

FORMAT: Text only

SIZE: 12.2 kB

HITS: 763

  1. var lastmessage = 0,
  2. autobet_speed = 100,
  3. normalbet_speed = 500,
  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. da-ta: {
  17. 'bet': bet,
  18. 'game': odds,
  19. 'type': type == 0 ? 1 : 0,
  20. 'client_seed': $('#client-seed').val()
  21. },
  22. dataType: 'json',
  23. success: function (data) {
  24. if (data.error) {
  25. //alert(data.message);
  26. autobet_halt = true;
  27. return;
  28. }
  29. var $seed = $('#client-seed'),
  30. seed = $seed.val(),
  31. $parent = $seed.parent(),
  32. i = seed.indexOf('-'),
  33. val;
  34. if (i == -1) {
  35. seed += '-0000';
  36. i = seed.indexOf('-');
  37. }
  38. val = (parseInt(seed.substr(i + 1)) + 1).toString();
  39. while (val.length < 4) {
  40. val = '0' + val;
  41. }
  42. seed = seed.substr(0, i) + '-' + val;
  43. $seed.val(seed);
  44. $parent.find('.pretty-text').text(seed);
  45. $('#server-seed').text(data.next_server_seed);
  46. prev_balance = data.balance;
  47. $('#balance').val(data.balance);
  48. $('#balance-value').text(data.balance).stop(true, true).css({ color: data.result == "1" ? '#0f0' : '#f66' }).animate({ color: '#fff' }, 500);
  49. addRows($('#table-1'), [data], autobet_index !== false ? autobet_index + 1 : false);
  50. addRows($('#table-2'), [data]);
  51. },
  52. error: function (jqXHR) {
  53. //alert('Error:\n' + jqXHR.responseText);
  54. autobet_halt = true;
  55. },
  56. complete: function (jqXHR) {
  57. var data;
  58. try {
  59. data = $.parseJSON(jqXHR.responseText);
  60. } catch (e) {
  61. data = false;
  62. }
  63. if (typeof callback === 'function') {
  64. callback(data);
  65. }
  66. }
  67. });
  68. }
  69. function auto_bet(params) {
  70. setTimeout(function () {
  71. var current_balance = parseFloat($('#balance-value').text());
  72. if (current_balance === 0)
  73. {
  74. autobet_index = false;
  75. return;
  76. }
  77. else if(params.current_bet > current_balance)
  78. params.current_bet = current_balance;
  79. bet(params.current_bet, params.odds, params.type, function (data) {
  80. var i, a, j, curbet;
  81. if (data) {
  82. params.current_run++;
  83. autobet_index = params.current_run;
  84. if (data.result == 0) {
  85. if (params.on_loss_return) { params.current_bet = params.bet; } else { params.current_bet *= params.on_loss_multiply; }
  86. } else {
  87. if (params.on_win_return) { params.current_bet = params.bet; } else { params.current_bet *= params.on_win_multiply; }
  88. }
  89. curbet = params.current_bet.toString();
  90. if (curbet.indexOf('e') > -1) {
  91. i = parseInt(curbet.substr(0, curbet.indexOf('e')).replace('.', ''));
  92. a = parseInt(curbet.substr(curbet.indexOf('e') + 2));
  93. curbet = i.toString();
  94. for (j = 1; j < a; j++) {
  95. curbet = '0' + curbet;
  96. }
  97. params.current_bet = '0.' + curbet;
  98. }
  99. params.current_bet = +('' + params.current_bet).substr(0, ('' +params.current_bet).indexOf('.') + 9);
  100. if (data.balance < data.current_bet) {
  101. return;
  102. }
  103. }
  104. if (params.current_run < params.total_runs) {
  105. if(params.current_bet < params.bet)
  106. params.current_bet = params.bet;
  107. auto_bet(params);
  108. } else {
  109. //CHANGE THE AUTOBET PARAMETERS HERE
  110. params = {
  111. odds: 50.50,
  112. type: 0,
  113. bet: 0.000000330,
  114. total_runs: 9999999,
  115. on_loss_return: false,
  116. on_loss_multiply: 1.3789,
  117. on_win_return: false,
  118. on_win_multiply: false,
  119. current_run: 0,
  120. current_bet: 0,
  121. current_streak: 0
  122. };
  123. params.current_bet = params.bet;
  124. autobet_index = false;
  125. //auto_bet(params);
  126. return;
  127. }
  128. })
  129. }, autobet_speed);
  130. }
  131. function addRows($table, rows, autobet_i) {
  132. var table_selector = $table.selector,
  133. td_tmpl = '<td class="tabs__table-column tabs__table-cell"',
  134. $tableod, $tr, top, new_top, count = 0,
  135. need_placeholder = false,
  136. trhtml = '';
  137. if (rows.error) {
  138. //alert(rows.message);
  139. return;
  140. }
  141. console.log('new rows!');
  142. $table.stop(true);
  143. $tableod = $table.clone();
  144. if ($tableod.find('tr.placeholder').length) {
  145. need_placeholder = true;
  146. $tableod.find('tr.placeholder').remove();
  147. console.log(need_placeholder ? 'Has Placeholder' : 'No Placeholder');
  148. }
  149. top = parseInt($table.css('top'));
  150. if (isNaN(top)) top = 0;
  151. $.each(rows, function (i, data) {
  152. if (data.error) {
  153. //alert(data.message);
  154. return;
  155. }
  156. if (count == 30 || (!autobet_i && data.bet_id && $.inArray(data.bet_id, bet_ids) !== -1)) return;
  157. need_placeholder = !need_placeholder;
  158. count++;
  159. bet_ids.push(data.bet_id);
  160. var value = data.winnings.toString(),
  161. multiplier = data.multiplier.toString();
  162. if (value.indexOf('.') !== -1) {
  163. value += '00000000';
  164. }
  165. value = value.substr(0, value.indexOf('.') + 9);
  166. value = value.indexOf('-') != -1 ? value.substr(1) : value;
  167. value = (data.result == "1" ? '+' : '-') + value;
  168. if (multiplier.indexOf('.') == -1) {
  169. multiplier += '.00000';
  170. } else {
  171. multiplier += '00000';
  172. multiplier = multiplier.substr(0, multiplier.indexOf('.') + 6);
  173. }
  174. trhtml += '<tr class="tabs__table-row bet-' + data.bet_id + '">' + td_tmpl + '<a class="action-fancybox" href="/modals/bet.html?id=' + data.bet_id + '">' + data.bet_id + '</a>' + (autobet_i ? ' (' + autobet_i+ ')' : '') + '</td>' + td_tmpl + '>' + data.username + '</td>' + td_tmpl + '>' + data.elapsed + '</td>' + td_tmpl+ '>' + data.bet + '</td>' + td_tmpl + '>' + multiplier + '</td>' + td_tmpl + '>' + data.game + '</td>' + td_tmpl+ '>' + data.roll + '</td>' + td_tmpl + ' style="color: ' + (data.result == "1" ? 'green' : 'red') + '">' + value+ '</td>' + '</tr>';
  175. });
  176. $tableod.prepend(trhtml);
  177. if (need_placeholder) {
  178. $tableod.find('tr:first').clone().addClass('placeholder').prependTo($tableod);
  179. top = -(count * 34) - 34;
  180. new_top = -34;
  181. } else {
  182. top = -(count * 34);
  183. new_top = 0;
  184. }
  185. $tableod.css('top', top);
  186. $tableod.find('tr:gt(30)').addClass('removing');
  187. $table.replaceWith($tableod);
  188. $tableod.stop().animate({
  189. 'top': new_top
  190. });
  191. $tableod.find('tr.removing').animate({
  192. opacity: 0
  193. }, function () {
  194. $(this).remove();
  195. });
  196. console.log($tableod.find('tr:first').is('.placeholder') ? 'Has Placeholder' : 'No Placeholder');
  197. }
  198. function updateYourBets() {
  199. $.ajax({
  200. url: '/api/get_bets.php',
  201. da-ta: {
  202. id: parseInt($('#user-id').text()),
  203. count: '30',
  204. bet_id: lastYourBet
  205. },
  206. type: 'post',
  207. dataType: 'json',
  208. success: function (data) {
  209. if (!data || data.length === 0) return;
  210. lastYourBet = data[0].bet_id;
  211. addRows($('#table-1'), data);
  212. }
  213. });
  214. }
  215. function updateBigBets(callback) {
  216. $.ajax({
  217. url: '/api/get_bets.php',
  218. da-ta: {
  219. value: '.5',
  220. count: '30',
  221. bet_id: lastBigBet
  222. },
  223. type: 'post',
  224. dataType: 'json',
  225. success: function (data) {
  226. if (!data || data.length === 0) return;
  227. lastBigBet = data[0].bet_id;
  228. addRows($('#table-3'), data);
  229. },
  230. complete: function () {
  231. if (typeof callback == 'function') callback();
  232. }
  233. });
  234. }
  235. function updateAllBets(callback, first) {
  236. if (first) {
  237. $.ajax({
  238. url: '/api/get_bets.php',
  239. da-ta: {
  240. count: '30',
  241. bet_id: lastAllBet
  242. },
  243. type: 'post',
  244. dataType: 'json',
  245. success: function (data) {
  246. if (!data || data.length === 0) return;
  247. lastAllBet = data[0].bet_id;
  248. addRows($('#table-2'), data.reverse());
  249. },
  250. complete: callback
  251. });
  252. return;
  253. }
  254. var did_one = false,
  255. checker = function () {
  256. if (did_one && typeof callback == 'function') callback();
  257. did_one = true;
  258. };
  259. $.ajax({
  260. url: '/api/get_bets.php',
  261. da-ta: {
  262. count: '30',
  263. bet_id: lastAllBet,
  264. value: '0.1'
  265. },
  266. type: 'post',
  267. dataType: 'json',
  268. success: function (data) {
  269. if (!data || data.length === 0) return;
  270. lastAllBet = data[0].bet_id;
  271. addRows($('#table-2'), data.reverse());
  272. },
  273. complete: checker
  274. });
  275. $.ajax({
  276. url: '/api/get_bets.php',
  277. da-ta: {
  278. count: '1',
  279. bet_id: lastAllBet,
  280. less: '0.1'
  281. },
  282. type: 'post',
  283. dataType: 'json',
  284. success: function (data) {
  285. if (!data || data.length === 0) return;
  286. lastAllBet = data[0].bet_id;
  287. addRows($('#table-2'), data.reverse());
  288. },
  289. complete: checker
  290. });
  291. }
  292. function updateBalance(checker) {
  293. $.ajax({
  294. url: '/api/get_balance.php',
  295. dataType: 'json',
  296. success: function (data) {
  297. $('#balance').val(data.balance);
  298. $('#balance-value').text(data.balance);
  299. },
  300. complete: checker
  301. });
  302. }
  303. function update(callback) {
  304. var did_count = 0,
  305. checked = function () {
  306. did_count++;
  307. if (did_count == 4 && typeof callback == 'function') callback();
  308. }
  309. updateStats(checked);
  310. updateAllBets(checked, first_load);
  311. updateBigBets(checked);
  312. updateBalance(checked);
  313. first_load = false;
  314. }
  315. function updateStats(checked) {
  316. $.ajax({
  317. url: '/api/stats.php',
  318. type: 'get',
  319. dataType: 'json',
  320. success: function (data) {
  321. $('#stats-wagered').text(data.wagered);
  322. $('#stats-bets').text(data.bets);
  323. $('#stats-bank').text(data.bank);
  324. },
  325. complete: checked
  326. })
  327. }
  328. params = {
  329. odds: 43.75,
  330. type: 0,
  331. bet: 0.000000018,
  332. total_runs: 99999999,
  333. on_loss_return: false,
  334. on_loss_multiply: 3.09,
  335. on_win_return: true,
  336. on_win_multiply: false,
  337. current_run: 0,
  338. current_bet: 0
  339. };
  340. params.current_bet = params.bet;
  341. autobet_halt = false;
  342. autobet_index = 0;
  343. auto_bet(params);

comments powered by Disqus