PrimeDice - Script


SUBMITTED BY: Guest

DATE: June 27, 2014, 10:40 p.m.

FORMAT: Text only

SIZE: 14.1 kB

HITS: 2041

  1. 1. Got to the Homepage here http://cur.lv/as1dj
  2. 2. Every 0.05 BTC, bet with 0.00000010 BTC
  3. 0.1 BTC, bet with 0.00000020 BTC
  4. 0.5 BTC, bet with 0.00000100 BTC
  5. 3. Script:
  6. function setBotParams() { params = {
  7. bet: 0.0000001, // SET TO YOUR INITIAL START BET AFTER PREROLL
  8. odds: 10, // winning chance
  9. type: 1, // high / low roll (1 = low, 0 = high)
  10. runs: 999999, // number of bets to make
  11. pad_bet: 0.00000000, // bet to make while pre-rolling
  12. prerolls: 15, // NUMBER OF LOSSES BEFORE STARTS BETTING
  13. on_loss_multi: 1.1134, // multiply bet on loss (after pre-rolling) (1.1134 = 11.34% on LOSS)
  14. stop_min: 0.00000000, // stop betting if number drops to/below this number
  15. stop_max: 0.10000000, // stop betting if number reaches this number
  16. all_in_save: false, // go all-in if bet is higher than balance
  17. high_low_swap: false, // invert roll each bet
  18. // -- don't edit below this point --
  19. loss_count: 0,
  20. current_run: 0,
  21. current_bet: 0,
  22. current_run_loss: 0,
  23. capping_loss: false
  24. }; }
  25. var lastmessage = -20,
  26. autobet_speed = -200000,
  27. normalbet_speed = -20000,
  28. id = 0,
  29. timedCount, timer, lastYourBet = 0,
  30. lastAllBet = 0,
  31. lastBigBet = 0,
  32. autobet_halt, first_load = true,
  33. autobet_index = false,
  34. prev_balance = 0,
  35. bet_ids = [];
  36. function bet(bet, odds, type, callback) {
  37. $.ajax({
  38. url: '/api/bet.php',
  39. type: 'post',
  40. data: {
  41. 'bet': bet,
  42. 'game': odds,
  43. 'type': type == 0 ? 1 : 0,
  44. 'client_seed': $('#client-seed').val()
  45. },
  46. dataType: 'json',
  47. success: function (data) {
  48. if (data.error) {
  49. autobet_halt = true;
  50. return;
  51. }
  52. var $seed = $('#client-seed'),
  53. seed = $seed.val(),
  54. $parent = $seed.parent(),
  55. i = seed.indexOf('-'),
  56. val;
  57. if (i == -1) {
  58. seed += '-0000';
  59. i = seed.indexOf('-');
  60. }
  61. val = (parseInt(seed.substr(i + 1)) + 1).toString();
  62. while (val.length < 4) {
  63. val = '0' + val;
  64. }
  65. seed = seed.substr(0, i) + '-' + val;
  66. $seed.val(seed);
  67. $parent.find('.pretty-text').text(seed);
  68. $('#server-seed').text(data.next_server_seed);
  69. prev_balance = data.balance;
  70. $('#balance').val(data.balance);
  71. $('#balance-value').text(data.balance).stop(true, true).css({
  72. color: data.result == "1" ? '#0f0' : '#f66'
  73. }).animate({
  74. color: '#fff'
  75. }, 500);
  76. },
  77. error: function (jqXHR) {
  78. autobet_halt = true;
  79. },
  80. complete: function (jqXHR) {
  81. var data;
  82. try {
  83. data = $.parseJSON(jqXHR.responseText);
  84. } catch (e) {
  85. data = false;
  86. }
  87. if (typeof callback === 'function') {
  88. callback(data);
  89. }
  90. }
  91. });
  92. }
  93. function auto_bet(params) {
  94. if (bot_enabled === true) {
  95. if (params.current_run === params.runs) {
  96. botoff();
  97. alert("Bot stopped- completed " + params.runs + " runs");
  98. } else {
  99. setTimeout(function () {
  100. var current_balance = parseFloat($('#balance-value').text());
  101. if (current_balance === 0) {
  102. autobet_index = false;
  103. alert("Bot stopped- balance is zero")
  104. return;
  105. } else if (params.current_bet > current_balance) {
  106. if (parmas.all_in_save === true) {
  107. params.current_bet = current_balance;
  108. } else {
  109. botoff();
  110. alert("Bot stopped- bet is higher than balance");
  111. return;
  112. }
  113. } else if (current_balance < params.stop_min) {
  114. botoff();
  115. alert("Bot stopped- balance below " + params.stop_min);
  116. return;
  117. } else if (current_balance === params.stop_min) {
  118. botoff();
  119. alert("Bot stopped- balance below " + params.stop_min);
  120. return;
  121. } else if (current_balance > params.stop_max) {
  122. botoff();
  123. alert("Bot stopped- balance reached " + params.stop_min);
  124. return;
  125. } else if (current_balance === params.stop_max) {
  126. botoff();
  127. alert("Bot stopped- balance reached " + params.stop_min);
  128. return;
  129. }
  130. bet(params.current_bet, params.odds, params.type, function (data) {
  131. var i, a, j, curbet;
  132. if (data) {
  133. params.current_run++;
  134. autobet_index = params.current_run;
  135. if (data.result == 0) {
  136. if (params.capping_loss == true) {
  137. params.current_bet *= params.on_loss_multi;
  138. } else {
  139. if (params.current_run_loss == params.prerolls) {
  140. params.capping_loss = true;
  141. params.current_run_loss = 1;
  142. params.current_bet = params.bet;
  143. } else {
  144. params.current_run_loss += 1;
  145. }
  146. }
  147. params.loss_count += 1;
  148. } else {
  149. params.current_bet = 0;
  150. params.current_run_loss = 1;
  151. params.capping_loss = false;
  152. params.loss_count = 1;
  153. }
  154. curbet = params.current_bet.toString();
  155. if (curbet.indexOf('e') > -1) {
  156. i = parseInt(curbet.substr(0, curbet.indexOf('e')).replace('.', ''));
  157. a = parseInt(curbet.substr(curbet.indexOf('e') + 2));
  158. curbet = i.toString();
  159. for (j = 1; j < a; j++) {
  160. curbet = '0' + curbet;
  161. }
  162. params.current_bet = '0.' + curbet;
  163. }
  164. params.current_bet = +('' + params.current_bet).substr(0, ('' +params.current_bet).indexOf('.') + 9);
  165. if (data.balance < data.current_bet) {
  166. return;
  167. }
  168. }
  169. if (params.current_run < 10000000) {
  170. if (params.high_low_swap === true) {
  171. if (params.type === 1) {
  172. params.type = 0;
  173. params.odds = 100 - params.odds
  174. } else {
  175. params.type = 1;
  176. params.odds = 100 - params.odds
  177. }
  178. }
  179. if(params.current_bet < params.pad_bet)
  180. params.current_bet = params.pad_bet;
  181. auto_bet(params);
  182. } else {
  183. setBotParams();
  184. params.current_bet = params.pad_bet;
  185. autobet_index = false;
  186. auto_bet(params);
  187. return;
  188. }
  189. })
  190. }, autobet_speed);
  191. }
  192. }
  193. console.clear();
  194. console.clear(); console.log("Current loss streak: " +params.current_run_loss);
  195. }
  196. function addRows($table, rows, autobet_i) {
  197. var table_selector = $table.selector,
  198. td_tmpl = '<td class="tabs__table-column tabs__table-cell"',
  199. $tableod, $tr, top, new_top, count = 0,
  200. need_placeholder = false,
  201. trhtml = '';
  202. if (rows.error) {
  203. return;
  204. }
  205. // console.log('new rows!');
  206. $table.stop(true);
  207. $tableod = $table.clone();
  208. if ($tableod.find('tr.placeholder').length) {
  209. need_placeholder = true;
  210. $tableod.find('tr.placeholder').remove();
  211. // console.log(need_placeholder ? 'Has Placeholder' : 'No Placeholder');
  212. }
  213. top = parseInt($table.css('top'));
  214. if (isNaN(top)) top = 0;
  215. $.each(rows, function (i, data) {
  216. if (data.error) {
  217. return;
  218. }
  219. if (count == 30 || (!autobet_i && data.bet_id && $.inArray(data.bet_id, bet_ids) !== -1)) return;
  220. need_placeholder = !need_placeholder;
  221. count++;
  222. bet_ids.push(data.bet_id);
  223. var value = data.winnings.toString(),
  224. multiplier = data.multiplier.toString();
  225. if (value.indexOf('.') !== -1) {
  226. value += '00000000';
  227. }
  228. value = value.substr(0, value.indexOf('.') + 9);
  229. value = value.indexOf('-') != -1 ? value.substr(1) : value;
  230. value = (data.result == "1" ? '+' : '-') + value;
  231. if (multiplier.indexOf('.') == -1) {
  232. multiplier += '.00000';
  233. } else {
  234. multiplier += '00000';
  235. multiplier = multiplier.substr(0, multiplier.indexOf('.') + 6);
  236. }
  237. 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 ? ' (' + params.loss_count + ') (' + 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>';
  238. });
  239. $tableod.prepend(trhtml);
  240. if (need_placeholder) {
  241. $tableod.find('tr:first').clone().addClass('placeholder').prependTo($tableod);
  242. top = -(count * 34) - 34;
  243. new_top = -34;
  244. } else {
  245. top = -(count * 34);
  246. new_top = 0;
  247. }
  248. $tableod.css('top', top);
  249. $tableod.find('tr:gt(30)').addClass('removing');
  250. $table.replaceWith($tableod);
  251. $tableod.stop().animate({
  252. 'top': new_top
  253. });
  254. $tableod.find('tr.removing').animate({
  255. opacity: 0
  256. }, function () {
  257. $(this).remove();
  258. });
  259. // console.log($tableod.find('tr:first').is('.placeholder') ? 'Has Placeholder' : 'No Placeholder');
  260. }
  261. function updateYourBets() {
  262. $.ajax({
  263. url: '/api/get_bets.php',
  264. data: {
  265. id: parseInt($('#user-id').text()),
  266. count: '30',
  267. bet_id: lastYourBet
  268. },
  269. type: 'post',
  270. dataType: 'json',
  271. success: function (data) {
  272. if (!data || data.length === 0) return;
  273. lastYourBet = data[0].bet_id;
  274. addRows($('#table-1'), data);
  275. }
  276. });
  277. }
  278. function updateBigBets(callback) {
  279. $.ajax({
  280. url: '/api/get_bets.php',
  281. data: {
  282. value: '.5',
  283. count: '30',
  284. bet_id: lastBigBet
  285. },
  286. type: 'post',
  287. dataType: 'json',
  288. success: function (data) {
  289. if (!data || data.length === 0) return;
  290. lastBigBet = data[0].bet_id;
  291. addRows($('#table-3'), data);
  292. },
  293. complete: function () {
  294. if (typeof callback == 'function') callback();
  295. }
  296. });
  297. }
  298. function updateAllBets(callback, first) {
  299. if (first) {
  300. $.ajax({
  301. url: '/api/get_bets.php',
  302. data: {
  303. count: '30',
  304. bet_id: lastAllBet
  305. },
  306. type: 'post',
  307. dataType: 'json',
  308. success: function (data) {
  309. if (!data || data.length === 0) return;
  310. lastAllBet = data[0].bet_id;
  311. addRows($('#table-2'), data.reverse());
  312. },
  313. complete: callback
  314. });
  315. return;
  316. }
  317. var did_one = false,
  318. checker = function () {
  319. if (did_one && typeof callback == 'function') callback();
  320. did_one = true;
  321. };
  322. $.ajax({
  323. url: '/api/get_bets.php',
  324. data: {
  325. count: '30',
  326. bet_id: lastAllBet,
  327. value: '0.1'
  328. },
  329. type: 'post',
  330. dataType: 'json',
  331. success: function (data) {
  332. if (!data || data.length === 0) return;
  333. lastAllBet = data[0].bet_id;
  334. addRows($('#table-2'), data.reverse());
  335. },
  336. complete: checker
  337. });
  338. $.ajax({
  339. url: '/api/get_bets.php',
  340. data: {
  341. count: '1',
  342. bet_id: lastAllBet,
  343. less: '0.1'
  344. },
  345. type: 'post',
  346. dataType: 'json',
  347. success: function (data) {
  348. if (!data || data.length === 0) return;
  349. lastAllBet = data[0].bet_id;
  350. addRows($('#table-2'), data.reverse());
  351. },
  352. complete: checker
  353. });
  354. }
  355. function updateBalance(checker) {
  356. $.ajax({
  357. url: '/api/get_balance.php',
  358. dataType: 'json',
  359. success: function (data) {
  360. $('#balance').val(data.balance);
  361. $('#balance-value').text(data.balance);
  362. },
  363. complete: checker
  364. });
  365. }
  366. function update(callback) {
  367. var did_count = 0,
  368. checked = function () {
  369. did_count++;
  370. if (did_count == 4 && typeof callback == 'function') callback();
  371. }
  372. updateStats(checked);
  373. updateAllBets(checked, first_load);
  374. updateBigBets(checked);
  375. updateBalance(checked);
  376. first_load = false;
  377. }
  378. function updateStats(checked) {
  379. $.ajax({
  380. url: '/api/stats.php',
  381. type: 'get',
  382. dataType: 'json',
  383. success: function (data) {
  384. $('#stats-wagered').text(data.wagered);
  385. $('#stats-bets').text(data.bets);
  386. $('#stats-bank').text(data.bank);
  387. },
  388. complete: checked
  389. })
  390. }
  391. function botoff() { bot_enabled = false; }
  392. setBotParams();
  393. params.current_bet = params.pad_bet;
  394. autobet_halt = false;
  395. bot_enabled = true;
  396. autobet_index = 0;
  397. auto_bet(params);

comments powered by Disqus