HOW TO WIN EVERYTIME ON PRIMEDICE


SUBMITTED BY: realitycheck777

DATE: Nov. 30, 2015, 3:54 p.m.

FORMAT: Text only

SIZE: 41.2 kB

HITS: 415

  1. PASTE THIS ON THE CONSOLE OF CHROME OR FIREFOX:
  2. var loop, currentloss, betspeed, dialog, swapwincount, incrementwincount, swaplosscount, curbet, basebet, seedcount, prebet, prerollsenabled, profit, prerollson, prerollcount, betval, currentwin, target2, condition2, wincount, xhr, tstatus, seedlength, counter, charset, everyxrolls, wins, losses, data1, data2, swapenabled, betstarted, wmultcount, lmultcount, storebet, manualenabled;
  3. var balancebefore;var chart='';
  4. betspeed=500;
  5. seedcount = 0;
  6. currentloss = 0;
  7. lmultcount = 0;
  8. wmultcount = 0;
  9. prerollcount = 0;
  10. wins = 0;
  11. losses = 0;
  12. profit = 0;
  13. swaplosscount = 0;
  14. swapwincount = 0;
  15. incrementwincount = 0;
  16. loopenabled = false;
  17. manualenabled = false;
  18. loopcount = 0;
  19. seedlength = 5;
  20. counter = 0;
  21. charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ123';
  22. everyxrolls = 3;
  23. var JSINJ = '';
  24. JSINJ += '<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.js"></script>';
  25. JSINJ += '<link rel="stylesheet" type="text/css" href="https://jquery-ui.googlecode.com/svn/tags/latest/themes/dot-luv/jquery-ui.css">';
  26. JSINJ += '<script src="https://code.highcharts.com/highcharts.js"></script>';
  27. JSINJ += '<script src="https://code.highcharts.com/modules/exporting.js"></script>';
  28. $(JSINJ).appendTo('head');
  29. function initializeUI() {
  30. // Begin UI
  31. $('.hero__main').empty();
  32. var UI = '';
  33. UI += '<div id="result">';
  34. UI += '<ul>';
  35. UI += '<li><a href="/play#result-1">Last Bets: </a></li>';
  36. UI += '<li><a href="/play#result-2">Bet History: </a></li>';
  37. UI += '<li><a href="/play#result-1" id="lagfix">Browser Lag?: Click Here </a></li>';
  38. UI += '</ul>';
  39. UI += '<div id="result-1">';
  40. UI += '<table id="lastbet">';
  41. UI += '<tr><th>Bet</th><th>Payout</th><th>Game</th><th>Roll</th><th>Profit</th></tr></table>';
  42. UI += '<table id="lastbet2">';
  43. UI += '</table>';
  44. UI += '<table id="lastbet">';
  45. UI += '<tr><th>Balance</th><th>Loss Streak</th><th>Total Wins</th><th>Total Losses</th><th>Total Profit</th></tr></table>';
  46. UI += '<table id="lastbet3">';
  47. UI += '</table>';
  48. UI += '</div>';
  49. UI += '<div id="result-2">';
  50. UI += '<table id="lastbet">';
  51. UI += '<tr><th>Bet</th><th>Payout</th><th>Game</th><th>Roll</th><th>Profit</th></tr></table>';
  52. UI += '<div style="max-height:84px !important;overflow-y: scroll;overflow-x: hidden;"id="historycontainer">';
  53. UI += '<table id="lastbet2">';
  54. UI += '</table>';
  55. UI += '</div>';
  56. UI += '</div>';
  57. UI += '</div>';
  58. UI += '<div id="params">';
  59. UI += '<h3>Basic Settings</h3>';
  60. UI += '<div>';
  61. UI += '<table id="params1">';
  62. UI += '<tr><th>Basebet:</th><th>Multiplier:</th><th>Hi/Lo/Swap</th></tr>';
  63. UI += '<tr><td><input id="basebet" type="text" placeholder="Basebet"/><br><div id="basebetslider"></div></td><td><input id="payout" type="text" placeholder="ex. 10, 90"/><br><div id="payoutslider"></div></td>';
  64. UI += '<td><div id="hilo"><input type="radio" id="hi" value="hi" name="hilo"><label for="hi">Hi</label><input type="radio" id="lo" value="lo" name="hilo" checked="checked"><label for="lo">Lo</label><input type="radio" id="swap" value="swap" name="hilo"><label for="swap">Swap</label></div></td></tr>';
  65. UI += '<tr><th></th><th># of Prerolls</th><th>Preroll Bet</th></tr>';
  66. UI += '<tr><td> Prerolls: <input id="prerollsenabled" type="checkbox"/><label style="width: auto !important;" for="prerollsenabled">Off</label></td><td><input id="numprerolls" type="text" /></td><td><input type="text" id="prerollbet"/></td></tr>';
  67. UI += '<tr><th><label>Loss Preroll: <input id="lossprerollenabled" type="checkbox"><label style="width: auto !important;" for="lossprerollenabled">Off</label></label></th><th><label>After # Losses: <input style="width:85px;" id="prerollafterlosses" type="text" placeholder="After # of losses"/></th><th># of Prerolls After Loss: <input style="width:85px;" type="text" id="numlossprerolls" placeholder="# of prerolls"/></th></tr>';
  68. UI += '</table>';
  69. UI += '</div>';
  70. UI += '<h3>Win/Loss Settings</h3>';
  71. UI += '<div>';
  72. UI += '<table id="params1">';
  73. UI += '<tr><th>Multiply On Loss: <input id="lossmultenabled" type="checkbox"/><label style="width: auto !important;" for="lossmultenabled">Off</label></th><th>Multiply on Win: <input id="winmultenabled" type="checkbox"/><label style="width: auto !important;" for="winmultenabled">Off</label></th><th>Multiplier on W/L</th></tr>';
  74. UI += '<tr><td><label for="multloss">Mutiply After X Losses:</label><br><input id="multloss" placeholder="Multiply Every X Rolls"/></td><td><label for="multwin">Reset After X Wins:</label><br><input id="resetwin" placeholder="Reset After X Wins"/></td>';
  75. UI += '<td><input id="winlossmultiplier" placeholder="2 (2x), 1.5 (1.5x) etc"/></tr>';
  76. UI += '<tr><td><label>Increment Basebet by: <input id="incrementbaseenabled" style="padding: 2px !important;" type="checkbox"/><label style="width: auto !important;" for="incrementbaseenabled">Off</label></label></td><td><input placeholder="ex 0.00000100" id="incrementwin"> BTC </td><td><input placeholder="after #wins" id="incrementafterwins"></td></tr>';
  77. UI += '<tr><td>Reset base after base reaches: <input placeholder="ex 0.00000500"id="resetincrementbasebet"> </td><td> Reset to Base After Profit: <input type="checkbox" id="resetprofitenabled"><label style="width: auto !important;" for="resetprofitenabled">Off</label> </td><td><input placeholder="ex. reset after profit=0.00100000" id="resetprofit"></td></tr>';
  78. UI += '</table>';
  79. UI += '</div>';
  80. UI += '<h3>Advanced Settings</h3>';
  81. UI += '<div>';
  82. UI += '<table id="params1">';
  83. UI += '<tr><th><label>Stop After: <input id="stoplossenabled" type="checkbox"><label style="width: auto !important;" for="stoplossenabled">Off</label></label></th><th><label>Stop On Win: <input id="stopwinenabled" type="checkbox"><label style="width: auto !important;" for="stopwinenabled">Off</label></label></th><th>Swap After: <input id="swaprollsenabled" type="checkbox"><label style="width: auto !important;" for="swaprollsenabled">Off</label></th></tr>';
  84. UI += '<tr><td><input style="width:85px;" id="stoplosses" placeholder="# of losses"/></td><td></td>';
  85. UI += '<td><input id="swaprolls" type="text" placeholder="# of rolls"></tr>';
  86. UI += '<tr><th>Stop on Profit:<input id="stopprofitenabled" type="checkbox"><label style="width: auto !important;" for="stopprofitenabled">Off</label></th><th>Stop on Loss: <input id="stoploss2enabled" type="checkbox"><label style="width: auto !important;" for="stoploss2enabled">Off</label></th><th>Reset After: <input id="resetlossenabled" type="checkbox"><label style="width: auto !important;" for="resetlossenabled">Off</label></th></tr>';
  87. UI += '<tr><td><input id="stopprofitamount" type="text"/> </td><td>-<input id="stoplossamount" type="text"/></td><td><input id="resetlosses" placeholder="# Losses" type="text"/></td></tr>';
  88. UI += '<tr><th>Swap On Loss: <input id="swaponlossenabled" type="checkbox"><label style="width: auto !important;" for="swaponlossenabled">Off</label></th><th></th><th>Swap On Win:<input id="swaponwinenabled" type="checkbox"><label style="width: auto !important;"for="swaponwinenabled">Off</label></th></tr>';
  89. UI += '<tr><th><label for="swapafterlosses">Swap After X Losses</label></th><th></th><th><label for="swapafterwins">Swap After X Wins</label></th></tr>';
  90. UI += '<tr><td><input id="swapafterlosses"></td><td></td><td><input id="swapafterwins"></td></tr>';
  91. UI += '<tr><p>Note: Use Total Profit as your reference for stop loss/profit. Do NOT enter a balance.</p></tr>';
  92. UI += '</table>';
  93. UI += '</div>';
  94. UI += '<h3>Seed Settings</h3>';
  95. UI += '<div>';
  96. UI += '<table id="params1">';
  97. UI += '<tr><th>Current Seed:</th><th>Charset:</th><th>Change Every #: <input id="seedchangeon" type="checkbox"/><label style="width: auto !important;" for="seedchangeon">Off</label></th></tr>';
  98. UI += '<tr><td><input style="color:red;text-align:center;"id="currentseed"/></td><td><input id="charset" placeholder="Optional"/></td>';
  99. UI += '<td><input id="seedxrolls" placeholder="ex. 1, 10, 20"/></tr>';
  100. UI += '<tr><td>Change on Win: <input style="width: auto !important;" id="seedchangeonwin" type="checkbox"/><label style="width: auto !important;" for="seedchangeonloss">Off</label> </td><td>Change on Loss: <input id="seedchangeonloss" type="checkbox"/><label for="seedchangeonloss">Off</label></td></tr>';
  101. UI += '</table>';
  102. UI += '</div>';
  103. UI += '</div>';
  104. UI += '<div id="manual" style="display:none;">';
  105. UI += '<div style = "padding: 0 !important; z-index: 1000 !important;width:450px !important;height:350px !important;"id="dialog-form" title="Profit Over Time"><div id="chartContainer"></div></div>';
  106. //Manual Mode HTML
  107. UI += '<table id="params1"><tr>';
  108. UI += '<th><label for="manualamount">Bet Amount: </label></th><th><label for="manualttarget">Multiplier: </label></th><th><label for="manualthilo">High/Low: </label></th></tr>';
  109. UI += '<tr><td><input id="manualamount"><td><input id="manualtarget"></td><td><div id="manualhilo"><input type="radio" id="manualhi" value="High" name="manualhilo"><label for="manualhi">Hi</label><input type="radio" id="manuallow" name="manualhilo" checked="checked"><label for="manuallow">Low</label></td></tr></table></div>';
  110. UI += '</div><center><div id="toolbar" class="ui-widget-header ui-corner-all"><div id="buttonz"><span id="startstop"><button id="start">Start</button><button id="stop">Stop</button></span><span id="setsavereset"><button id="setparams">Set Params</button><button id="saveparams">Save Params</button><button id="resetstats">Reset Stats</button></span><span id="themeseed"><button id="seedchange">Change Seed</button><button id="darktheme">Theme - On/Off</button></span><button id="openChart">Show Chart</button><button style="padding:2px;font-size:10px;"id="manualmode">Manual Mode</button></div></div></center><br><center><button class="btn btn--primary btn--huge btn--limited btn--block text--center" id="spinner2">Roll</button></center>';
  111. //<label for="numrolls">Number of Rolls: <input id="numrollsenabled" type="checkbox"></label><input style="width:85px;" id="numrolls"/>
  112. $(UI).appendTo('.hero__main');
  113. $(function(){
  114. Highcharts.createElement('link',{href:'http://fonts.googleapis.com/css?family=Unica+One',rel:'stylesheet',type:'text/css'},null,document.getElementsByTagName('head')[0]);Highcharts.theme={colors:["#2b908f","#90ee7e","#f45b5b","#7798BF","#aaeeee","#ff0066","#eeaaee","#55BF3B","#DF5353","#7798BF","#aaeeee"],chart:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:1,y2:1},stops:[[0,'#2a2a2b'],[1,'#3e3e40']]},style:{fontFamily:"'Unica One', sans-serif"},plotBorderColor:'#606063'},title:{style:{color:'#E0E0E3',textTransform:'uppercase',fontSize:'20px'}},subtitle:{style:{color:'#E0E0E3',textTransform:'uppercase'}},xAxis:{gridLineColor:'#707073',labels:{style:{color:'#E0E0E3'}},lineColor:'#707073',minorGridLineColor:'#505053',tickColor:'#707073',title:{style:{color:'#A0A0A3'}}},yAxis:{gridLineColor:'#707073',labels:{style:{color:'#E0E0E3'}},lineColor:'#707073',minorGridLineColor:'#505053',tickColor:'#707073',tickWidth:1,title:{style:{color:'#A0A0A3'}}},tooltip:{backgroundColor:'rgba(0, 0, 0, 0.85)',style:{color:'#F0F0F0'}},plotOptions:{series:{dataLabels:{color:'#B0B0B3'},marker:{lineColor:'#333'}},boxplot:{fillColor:'#505053'},candlestick:{lineColor:'white'},errorbar:{color:'white'}},legend:{itemStyle:{color:'#E0E0E3'},itemHoverStyle:{color:'#FFF'},itemHiddenStyle:{color:'#606063'}},credits:{style:{color:'#666'}},labels:{style:{color:'#707073'}},drilldown:{activeAxisLabelStyle:{color:'#F0F0F3'},activeDataLabelStyle:{color:'#F0F0F3'}},navigation:{buttonOptions:{symbolStroke:'#DDDDDD',theme:{fill:'#505053'}}},rangeSelector:{buttonTheme:{fill:'#505053',stroke:'#000000',style:{color:'#CCC'},states:{hover:{fill:'#707073',stroke:'#000000',style:{color:'white'}},select:{fill:'#000003',stroke:'#000000',style:{color:'white'}}}},inputBoxBorderColor:'#505053',inputStyle:{backgroundColor:'#333',color:'silver'},labelStyle:{color:'silver'}},navigator:{handles:{backgroundColor:'#666',borderColor:'#AAA'},outlineColor:'#CCC',maskFill:'rgba(255,255,255,0.1)',series:{color:'#7798BF',lineColor:'#A6C7ED'},xAxis:{gridLineColor:'#505053'}},scrollbar:{barBackgroundColor:'#808083',barBorderColor:'#808083',buttonArrowColor:'#CCC',buttonBackgroundColor:'#606063',buttonBorderColor:'#606063',rifleColor:'#FFF',trackBackgroundColor:'#404043',trackBorderColor:'#404043'},legendBackgroundColor:'rgba(0, 0, 0, 0.5)',background2:'#505053',dataLabelsColor:'#B0B0B3',textColor:'#C0C0C0',contrastTextColor:'#F0F0F3',maskColor:'rgba(255,255,255,0.3)'};Highcharts.setOptions(Highcharts.theme);
  115. });
  116. //jQ-UI Settings
  117. jQSettings = '';
  118. jQSettings += '<script>';
  119. // Settings Here
  120. jQSettings += '';
  121. jQSettings += '$(function(){';
  122. jQSettings += 'dialog = $( "#dialog-form" ).dialog({autoOpen: false,height: 350,width: 450,modal: true, buttons: {Close: function() {dialog.dialog( "close" )}}});';
  123. jQSettings += 'chart = $("#chartContainer").highcharts({chart: {height: 350, width: 450},credits: { enabled: false }, title:{text:"Total Profit vs. # of Bets",x:-20}, subtitle:{text: "Bet Profit vs. # Bets"},yAxis:{title:{text:"Profit/Total Profit"},data:[0]},xAxis:{title:{text:"# of Bets"},data:[0]},series:[{name:"Total Profit",data:[0]},{name: "Bet Profit",data: [0]}]});';
  124. jQSettings += '$("#basebetslider").slider({value:0.00000000,min: 0.00000000,max: 0.00020001,step: 0.0000000010, slide: function( event, ui ) {$( "#basebet" ).val( ui.value );}});';
  125. jQSettings += '$("#payoutslider").slider({value:5.0,min: 1,max: 100,step: 1, slide: function( event, ui ) {$( "#payout" ).val( ui.value );}});';
  126. jQSettings += '$("#buttonz button").button();$("input:checkbox").button();$("div#hilo").buttonset();';
  127. jQSettings += '$("#themeseed").buttonset();$("#setsavereset").buttonset();$("#startstop").buttonset();';
  128. jQSettings += '$("#result").tabs();$("#manualhilo").buttonset(); $( "#params" ).accordion({collapsible: true});});';
  129. jQSettings += '</script>';
  130. $(jQSettings).appendTo('head');
  131. var UICSS = '';
  132. UICSS += '<style>';
  133. UICSS += 'span.ui-slider-handle { width: 12px !important; }';
  134. UICSS += '#basebetslider , #basebet, #payoutslider, #payout { width: 100% !important; }';
  135. UICSS += '#params h3 { padding: 5px; }';
  136. UICSS += '#params label { width: auto !important; }';
  137. UICSS += 'span.ui-button-text { font-size: 9px; }';
  138. UICSS += '#params, #result { border-radius: 0px; width: auto !important; }';
  139. UICSS += '.hero__main { padding: 2px; margin: 5px; }';
  140. UICSS += '.hero__main {font-size: 10px !important;}';
  141. UICSS += '.ui-accordion-content { height: auto !important; padding: 5px !important;}';
  142. UICSS += '.ui-accordion .ui-accordion-content {margin-left: 3px !important; margin-right: 3px;margin-top: 0.5px;}';
  143. UICSS += 'table#params1 input:text { width: auto; height: auto; }';
  144. UICSS += 'table#params1 th, table#params1 td, table#params1 label { width: 33% !important; padding:5px !important; }';
  145. UICSS += '#buttonz { margin:2px; padding: 1px; text-align: center; font-size: 12px;}';
  146. UICSS += '#toolbar { width:100%;display: inline-block; padding: 0px; margin-top:3px; }';
  147. UICSS += '#params *, #result * { font-size: 10px;}';
  148. UICSS += '#toolbar button { margin: 1px; }';
  149. UICSS += 'label.ui-button span, label .ui-button { padding: 2px !important; }';
  150. UICSS += '#manual { margin: 10px 0px 10px 60px;}';
  151. UICSS += 'body > div.ui-widget-overlay.ui-front { display: none !important; }';
  152. UICSS += '.ui-button-icon-primary { top: 0 !important; left: 0 !important;}';
  153. UICSS += '</style>';
  154. setTimeout(function () {
  155. $(UICSS).appendTo('head');
  156. }, 3000);
  157. }
  158. setTimeout(function () {
  159. initializeUI();
  160. }, 1000);
  161. function darkTheme() {
  162. var css = '',
  163. backgroundurl = 'http://cdn.wonderfulengineering.com/wp-content/uploads/2014/01/HD-backgrounds-3.jpg';
  164. css += '<style id="paraDark">';
  165. css += 'header, .tabs, .slideout__content__inside, .chat__you *, .btn, .hero__main, .rollrow-dark, .rollbox--prominent, .chat__input-holder{background-color:#121212 !important;color:#ccc !important;}';
  166. css += 'time{color:#ccc !important;}';
  167. css += 'div.tabs > div > div.live-data-header > div{background-color:#111111;border-top:1px solid #777; border-bottom:1px solid #777;}';
  168. css += '.btn,.btn--secondary.btn--active,.btn--secondary.btn--selector, .btn--submit:last-child{border:1px solid #777 !important;background-color:#242130 !important;color:#ccc!important;}';
  169. css += '.btn:hover,.btn--secondary.btn--active:hover,.btn--secondary.btn--selector:hover{border:1px solid #777 !important;background-color:#322E47 !important;color:#ccc!important;}';
  170. css += '.hero{margin-bottom:0px;background:url("' + backgroundurl + '") no-repeat 50% 50%;}';
  171. css += '.slideout *{color:#ccc;}';
  172. css += '.tabs{padding-top:20px;border-top:1px solid #777 !important;}';
  173. css += 'header{border: 1px solid #777 !important;border-left:none !important;border-right:none !important;}';
  174. css += '.rollrow-thin, .rollrow-dark .chat__input-holder {background-color:#212121;}';
  175. css += '.input{background-color:#323232 !important;color:#ccc;}';
  176. css += '.action-open-slideout{background-color:#121212 !important;}';
  177. css += 'span.admin{color:red !important}';
  178. css += '</style>';
  179. $(css).appendTo('head');
  180. }
  181. darkTheme();
  182. var mixcount = 0;
  183. betstarted = false;
  184. var swapswap = 2,
  185. swapcount = 0,
  186. lossprerollcount = 0,
  187. lossprerollson;
  188. var curbalance = $('div.hero > div.hero__content > div > div.grid__item.S--one-whole.M--one-whole.custom--one-whole > aside > div.grid.grid--bottom.grid--reversed > div:nth-child(2) > span.btn.btn--tertiary.btn--large.btn--limited.btn--block > span.btn__text.select div').text() * 100000000;
  189. function bet() {
  190. if (betstarted === true) {} else {
  191. betstarted = true;
  192. if (manualenabled === true) {
  193. manualamount = Math.floor($('#manualamount').val() * 100000000);
  194. if ($('#manualhi').is(':checked') === true) {
  195. manualcondition = '>';
  196. manualtarget = (99.99 - (99 / $('#manualtarget').val())).toFixed(2);
  197. } else if ($('#manuallow').is(':checked') === true) {
  198. manualcondition = '<';
  199. manualtarget = (99 / $('#manualtarget').val()).toFixed(2);
  200. }
  201. var betData = {
  202. amount: manualamount,
  203. condition: manualcondition,
  204. target: manualtarget,
  205. },
  206. url = 'https://api.primedice.com/api/bet?access_token=' + localStorage.token;
  207. } else {
  208. if ($('#resetprofitenabled').is(':checked') === true) {
  209. if (parseFloat(profit) >= $('#resetprofit').val()) {
  210. betval = basebet;
  211. curbet = betval;
  212. profit = 0;
  213. wmultcount = 0;
  214. /*betval = basebet;
  215. wmultcount = 0;
  216. profit = 0;
  217. if ($('#payout').val() == '5') {
  218. $('#payout').val(10);
  219. } else {
  220. $('#payout').val(5);
  221. }
  222. if (condition2 == '>') {
  223. target2 = (99.99 - (99 / $('#payout').val())).toFixed(2);
  224. } else if (condition2 == '<') {
  225. target2 = (99 / $('#payout').val()).toFixed(2);
  226. }*/
  227. }
  228. }
  229. if ($('#stopprofitenabled').is(':checked') === true) {
  230. if (profit >= $('#stopprofitamount').val()) {
  231. clearInterval(loop);
  232. loopenabled = false;
  233. loopcount = 0;
  234. }
  235. }
  236. if ($('#resetlossenabled').is(':checked') === true && prerollsenabled === false) {
  237. if ($('#resetlosses').val() <= currentloss) {
  238. betval = basebet;
  239. lmultcount = 0;
  240. wmultcount = 0;
  241. currentloss = 0;
  242. }
  243. }
  244. if ($('#stoploss2enabled').is(':checked') === true) {
  245. if (profit <= (-1 * $('#stoplossamount').val())) {
  246. clearInterval(loop);
  247. loopenabled = false;
  248. loopcount = 0;
  249. }
  250. }
  251. if (prerollsenabled === true) {
  252. prebet = Math.floor($('#prerollbet').val() * 100000000);
  253. curbet = prebet;
  254. } else {
  255. curbet = betval;
  256. }
  257. if ($('#lossprerollenabled').is(':checked') === true) {
  258. if (lossprerollson === true) {
  259. curbet = prebet;
  260. } else {
  261. curbet = betval;
  262. }
  263. }
  264. var betData = {
  265. amount: curbet,
  266. condition: condition2,
  267. target: target2,
  268. },
  269. url = 'https://api.primedice.com/api/bet?access_token=' + localStorage.token;
  270. }
  271. if (curbet > curbalance) {
  272. clearInterval(loop);
  273. loopenabled = false;
  274. loopcount = 0;
  275. }
  276. $.ajax({
  277. url: url,
  278. type: 'POST',
  279. data: betData,
  280. datatype: 'json',
  281. async: true,
  282. success: function (data, textStatus, jqXHR) {
  283. if ($('#seedchangeon').is(':checked') === true) {
  284. if ($('#charset').val() !== '') {
  285. charset = $('#charset').val();
  286. }
  287. if ($('#seedxrolls').val() === '') {} else {
  288. seedcount++;
  289. if (seedcount >= $('#seedxrolls').val()) {
  290. seedchange();
  291. seedcount = 0;
  292. }
  293. }
  294. }
  295. data1 = data;
  296. profit = profit = (parseFloat(profit) + parseFloat((data1.bet.profit / 100000000))).toFixed(8);
  297. curbalance = data1.user.balance;
  298. addRow();
  299. if (loopenabled === true) {
  300. loopcount++;
  301. }
  302. if ($('input:radio[name=hilo]:checked').val() == 'swap') {
  303. if ($('#swaprollsenabled').is(':checked') === true) {
  304. swapswap = $('#swaprolls').val();
  305. swapcount++;
  306. if (swapcount >= swapswap) {
  307. swap();
  308. swapcount = 0;
  309. }
  310. } else {
  311. swap();
  312. }
  313. }
  314. $('.btn__text.select div').text((data1.user.balance / 100000000).toFixed(8));
  315. if (data.bet.win === true) {
  316. win();
  317. if (prerollson === true) {
  318. if (prerollsenabled === false) {
  319. prerollsenabled = true;
  320. prerollcount = 0;
  321. }
  322. }
  323. $('.btn__text.select div').attr('style', 'color:green;');
  324. } else {
  325. lose();
  326. $('.btn__text.select div').attr('style', 'color:red;');
  327. }
  328. if (data.bet.win === true) {
  329. $('#result-1 #proff:nth(0), #result-2 #proff:nth(0)').attr('style', 'text-align: center; width: 20%; padding: 5px;color:green;');
  330. } else {
  331. $('#result-1 #proff:nth(0), #result-2 #proff:nth(0)').attr('style', 'text-align: center; width: 20%; padding: 5px;color:red;');
  332. }
  333. betstarted = false;
  334. },
  335. error: function (jqXHR, textStatus, errorThrown) {
  336. betstarted = false;
  337. }
  338. });
  339. }
  340. }
  341. function seedchange() {
  342. function seedgen() {
  343. var seed = '';
  344. for (var i = 0; i <= seedlength; i++)
  345. seed += charset.charAt(Math.floor(Math.random() * charset.length));
  346. return seed;
  347. }
  348. var s = seedgen(),
  349. url = 'https://api.primedice.com/api/seed?access_token=' + localStorage.token,
  350. sData = {
  351. seed: s
  352. };
  353. $.ajax({
  354. url: url,
  355. type: 'POST',
  356. data: sData,
  357. datatype: 'json',
  358. success: function (data, textStatus, jqXHR) {
  359. data2 = data;
  360. $('#currentseed').val(data2.seeds.client);
  361. },
  362. error: function (jqXHR, textStatus, errorThrown) {
  363. return false;
  364. }
  365. });
  366. }
  367. function addRow() {
  368. // Update Chart
  369. chart.addPoint([parseFloat(wins+losses), parseFloat(profit)]);
  370. chart2.addPoint([parseFloat(wins+losses), parseFloat((data1.bet.profit/100000000).toFixed(8))]);
  371. $('#lastID').text('Last Bet ID: ' + data1.bet.id);
  372. var bettable = '',
  373. bettab = '#result-1 #lastbet2';
  374. var bettab2 = '#result-2 #lastbet2';
  375. bettable += '<tr><td>' + (data1.bet.amount / 100000000).toFixed(8) + '</td>';
  376. bettable += '<td>' + data1.bet.multiplier + 'x' + '</td>'; /* return bet payout */
  377. bettable += '<td>' + (data1.bet.target).toFixed(2) + '</td>'; /* return target*/
  378. bettable += '<td>' + data1.bet.roll + '</td>'; /* return roll */
  379. bettable += '<td id="proff">' + (data1.bet.profit / 100000000).toFixed(8) + '</td></tr>';
  380. var stattable = '',
  381. stattab = '#lastbet3';
  382. stattable += '<tr><td style="color:green;">' + (data1.user.balance / 100000000).toFixed(8) + '</td><td style="color:red;">' + currentloss + '</td><td style="color:green;">' + wins + '</td><td style="color:red;">' + losses + '</td><td id="profit">' + profit + '</td></tr>';
  383. $(stattab).empty();
  384. $(stattab).prepend(stattable);
  385. stattable = '';
  386. $(bettab2).prepend(bettable);
  387. if ($(bettab + ' tbody tr').length >= 3) {
  388. $(bettab + ' tr').last().remove();
  389. $(bettab).prepend(bettable);
  390. bettable = '';
  391. } else if ($(bettab).length < 3) {
  392. $(bettab).prepend(bettable);
  393. bettable = '';
  394. }
  395. $('#lastbet2 *, #lastbet3 *, #lastbet *, #proff').css('text-align', 'center');
  396. $('#lastbet2 *, #lastbet3 *, #lastbet *').css('width', '20%');
  397. $('#lastbet *').css('padding', '5px');
  398. $('#lastbet *').css('border-bottom', '1px solid #ccc');
  399. $('#result-1').css('padding', '5px');
  400. $('#lastbet2 *, #lastbet3 *, #proff').css('padding', '5px');
  401. $('#lastbet > tbody > tr > th:nth-child(2)').css('border-top', '1px solid #ddd');
  402. if (profit >= 0) {
  403. $('#profit').css('color', 'green');
  404. } else {
  405. $('#profit').css('color', 'red');
  406. }
  407. }
  408. function win() {
  409. if ($('#incrementbaseenabled').is(':checked') === true) {
  410. incrementwincount++;
  411. if (incrementwincount >= $('#incrementafterwins').val()) {
  412. incrementwincount = 0;
  413. basebet = Math.floor(basebet + ($('#incrementwin').val() * 100000000));
  414. if (basebet >= Math.floor($('#resetincrementbasebet').val() * 100000000)) {
  415. basebet = Math.floor($('#basebet').val() * 100000000)
  416. }
  417. }
  418. }
  419. if ($('#swaponlossenabled').is(':checked') === true) {
  420. swaplosscount = 0;
  421. }
  422. if ($('#swaponwinenabled').is(':checked') === true) {
  423. swapwincount++;
  424. if (swapwincount >= $('#swapafterwins').val()) {
  425. swapwincount = 0;
  426. swap();
  427. }
  428. }
  429. if ($('#stopwinenabled').is(':checked') === true && prerollsenabled === false) {
  430. clearInterval(loop);
  431. currentloss = 0;
  432. loopcount = 0;
  433. loopenabled = false;
  434. }
  435. if (prerollson === true) {
  436. if (prerollsenabled === true) {
  437. prerollcount = 0;
  438. }
  439. }
  440. if ($('#seedchangeonwin').is(':checked') === true) {
  441. seedchange();
  442. }
  443. wins++;
  444. currentloss = 0;
  445. if ($('#winmultenabled').is(':checked') === true) {
  446. if (prerollsenabled === true) {} else {
  447. if (prerollson === true && prerollsenabled === false) {
  448. prerollsenabled = true;
  449. prerollcount = 0;
  450. }
  451. if (lossprerollson === true) {} else {
  452. wmultcount++;
  453. if (wmultcount < $('#resetwin').val()) {
  454. betval = betval * $('#winlossmultiplier').val();
  455. } else if (wmultcount >= $('#resetwin').val()) {
  456. betval = basebet;
  457. wmultcount = 0;
  458. }
  459. }
  460. }
  461. if ($('#lossprerollenabled').is(':checked') === true) {
  462. if (lossprerollson === true) {
  463. lossprerollcount = $('#prerollafterlosses').val();
  464. lossprerollson = true;
  465. } else {
  466. lossprerollcount = 0;
  467. lossprerollson = false;
  468. }
  469. }
  470. }
  471. if ($('#lossmultenabled').is(':checked') === true) {
  472. if (prerollsenabled === true) {
  473. prerollcount = 0;
  474. } else {
  475. if (prerollson === true && prerollsenabled === false) {
  476. prerollsenabled = true;
  477. prerollcount = 0;
  478. }
  479. if (lossprerollson === true) {
  480. lmultcount = 0;
  481. lossprerollcount = $('#prerollafterlosses').val();
  482. } else {
  483. betval = basebet;
  484. lmultcount = 0;
  485. lossprerollcount = 0;
  486. }
  487. }
  488. }
  489. }
  490. function lose() {
  491. if ($('#swaponlossenabled').is(':checked') === true) {
  492. swaplosscount++;
  493. if (swaplosscount >= $('#swapafterlosses').val()) {
  494. swap();
  495. swaplosscount = 0;
  496. }
  497. }
  498. if ($('#lossprerollenabled').is(':checked') === true) {
  499. lossprerollcount++;
  500. if (lossprerollcount == $('#prerollafterlosses').val()) {
  501. lossprerollson = true;
  502. }
  503. if (lossprerollcount >= (parseFloat($('#numlossprerolls').val()) + parseFloat($('#prerollafterlosses').val()))) {
  504. curbet = betval;
  505. lossprerollson = false;
  506. lossprerollcount = 0;
  507. }
  508. }
  509. if ($('#seedchangeonloss').is(':checked') === true) {
  510. seedcount = 0;
  511. seedchange();
  512. }
  513. currentloss++;
  514. if ($('#stoplossenabled').is(':checked') === true) {
  515. if ($('#stoplosses').val() <= currentloss) {
  516. clearInterval(loop);
  517. currentloss = 0;
  518. loopcount = 0;
  519. loopenabled = false;
  520. }
  521. }
  522. if (prerollson === true) {
  523. if (prerollsenabled === true) {
  524. prerollcount++;
  525. if (prerollcount >= $('#numprerolls').val()) {
  526. prerollsenabled = false;
  527. }
  528. }
  529. }
  530. losses++;
  531. if ($('#lossmultenabled').is(':checked') === true) {
  532. if (prerollsenabled === true) {} else {
  533. if (lossprerollson === true) {} else {
  534. lmultcount++;
  535. if (lmultcount >= $('#multloss').val()) {
  536. betval = betval * $('#winlossmultiplier').val();
  537. lmultcount = 0;
  538. }
  539. }
  540. }
  541. }
  542. }
  543. function swap() {
  544. if (condition2 == '<') {
  545. condition2 = '>';
  546. target2 = (99.99 - (99 / $('#payout').val())).toFixed(2);
  547. } else if (condition2 == '>') {
  548. condition2 = '<';
  549. target2 = (99 / $('#payout').val()).toFixed(2);
  550. }
  551. }
  552. var themeoff = false;
  553. // Click Funcs
  554. function init2() {
  555. $('#darktheme').click(function () {
  556. if (themeoff === true) {
  557. darkTheme();
  558. $('#smoothness').remove();
  559. var jqCSS = document.createElement('link');
  560. jqCSS.href = 'https://jquery-ui.googlecode.com/svn/tags/latest/themes/dot-luv/jquery-ui.css';
  561. jqCSS.type = 'text/css';
  562. jqCSS.rel = 'stylesheet';
  563. jqCSS.id = 'dark';
  564. document.getElementsByTagName('head')[0].appendChild(jqCSS);
  565. themeoff = false;
  566. } else if (themeoff === false) {
  567. removeTheme();
  568. $('#dark').remove();
  569. var jqCSS = document.createElement('link');
  570. jqCSS.href = 'https://jquery-ui.googlecode.com/svn/tags/latest/themes/smoothness/jquery-ui.css';
  571. jqCSS.type = 'text/css';
  572. jqCSS.rel = 'stylesheet';
  573. jqCSS.id = 'smoothness';
  574. document.getElementsByTagName('head')[0].appendChild(jqCSS);
  575. themeoff = true;
  576. }
  577. });
  578. $('#spinner2').click(function () {
  579. bet();
  580. });
  581. if ($('#params label.ui-button').prev().is(':checked') === false && $('#params label.ui-button').prev().attr('type') != 'radio') {
  582. $('#params label.ui-button').text('On');
  583. } else {
  584. if ($('#params label.ui-button').prev().attr('type') != 'radio') {
  585. $('#params label.ui-button').text('Off');
  586. }
  587. }
  588. $('#params label.ui-button').click(function () {
  589. if ($(this).prev().is(':checked') === false && $(this).prev().attr('type') != 'radio') {
  590. $(this).text('On');
  591. } else {
  592. if ($(this).prev().attr('type') != 'radio') {
  593. $(this).text('Off');
  594. }
  595. }
  596. })
  597. $('#seedchange').click(function () {
  598. seedchange();
  599. });
  600. $('#detach').click(function () {
  601. $('#result').draggable();
  602. });
  603. $('#manualmode').click(function () {
  604. if ($(this).text() == 'Manual Mode') {
  605. manualenabled = true;
  606. $('#params').hide();
  607. $('#manual').show();
  608. $(this).text('Auto Mode');
  609. return;
  610. } else if ($(this).text() == 'Auto Mode') {
  611. manualenabled = false;
  612. $('#params').show();
  613. $('#manual').hide();
  614. $(this).text('Manual Mode');
  615. return;
  616. }
  617. })
  618. $('#setparams').click(function () {
  619. if ($('#lossprerollenabled').is(':checked') === false) {
  620. lossprerollson = false;
  621. }
  622. lmultcount = 0;
  623. currentloss = 0;
  624. wmultcount = 0;
  625. loopcount = 0;
  626. if ($('#prerollbet').val() !== "") {
  627. prebet = $('#prerollbet').val();
  628. } else {
  629. prebet = 0;
  630. }
  631. if ($('#prerollsenabled').is(':checked') === true) {
  632. prerollson = true;
  633. prerollcount = 0;
  634. prerollsenabled = true;
  635. prebet = Math.floor($('#prerollbet').val() * 100000000);
  636. basebet = Math.floor($('#basebet').val() * 100000000);
  637. betval = basebet;
  638. } else if ($('#prerollsenabled').is(':checked') === false) {
  639. prerollson = false;
  640. prerollsenabled = false;
  641. basebet = Math.floor($('#basebet').val() * 100000000);
  642. betval = basebet;
  643. }
  644. if ($('input:radio[name=hilo]:checked').val() == 'hi') {
  645. condition2 = '>';
  646. target2 = (99.99 - (99 / $('#payout').val())).toFixed(2);
  647. } else if ($('input:radio[name=hilo]:checked').val() == 'lo') {
  648. condition2 = '<';
  649. target2 = (99 / $('#payout').val()).toFixed(2);
  650. } else if ($('input:radio[name=hilo]:checked').val() == 'swap') {
  651. condition2 = '<';
  652. target2 = 0 + (99 / $('#payout').val()).toFixed(2);
  653. swapenabled = true;
  654. }
  655. });
  656. $('#lagfix').click(function () {
  657. $('#result-2 table:nth(1)').empty();
  658. chart.setData([]);chart2.setData([]);
  659. });
  660. $('#saveparams').click(function () {
  661. localStorage.setItem('params-stored', true);
  662. localStorage.setItem('basebet', $('#basebet').val());
  663. localStorage.setItem('payout', $('#payout').val());
  664. localStorage.setItem('prerollbet', $('#prerollbet').val());
  665. localStorage.setItem('prerollenabled', $('#prerollsenabled').is(':checked'));
  666. localStorage.setItem('numprerolls', $('#numprerolls').val());
  667. localStorage.setItem('lossenabled', $('#lossmultenabled').is(':checked'));
  668. localStorage.setItem('winenabled', $('#winmultenabled').is(':checked'));
  669. localStorage.setItem('resetwin', $('#resetwin').val());
  670. localStorage.setItem('xlosses', $('#multloss').val());
  671. localStorage.setItem('wlmult', $('#winlossmultiplier').val());
  672. localStorage.setItem('seedchangeon', $('#seedchangeon').is(':checked'));
  673. localStorage.setItem('seedxrolls', $('#seedxrolls').val());
  674. localStorage.setItem('swapxrolls', $('#swaprolls').val());
  675. localStorage.setItem('swapenabled', $('#swaprollsenabled').is(':checked'));
  676. });
  677. $('#openChart').click(function(){
  678. $('#dialog-form').dialog("open");
  679. })
  680. if (localStorage.getItem('params-stored') === 'true') {
  681. $('#basebet').val(localStorage.getItem('basebet'));
  682. $('#payout').val(localStorage.getItem('payout'));
  683. $('#prerollbet').val(localStorage.getItem('prerollbet'));
  684. if (localStorage.getItem('prerollenabled') === 'true') {
  685. $('#prerollsenabled').click();
  686. } else {
  687. $('#prerollsenabled').prop('checked', false);
  688. }
  689. $('#numprerolls').val(localStorage.getItem('numprerolls'));
  690. if (localStorage.getItem('lossenabled') === 'true') {
  691. $('#lossmultenabled').click();
  692. $('#lossmultenabled').prop('checked', false);
  693. }
  694. if (localStorage.getItem('winenabled') === 'true') {
  695. $('#winmultenabled').click();
  696. } else {
  697. $('#winmultenabled').prop('checked', false);
  698. }
  699. $('#resetwin').val(localStorage.getItem('resetwin'));
  700. $('#multloss').val(localStorage.getItem('xlosses'));
  701. $('#winlossmultiplier').val(localStorage.getItem('wlmult'));
  702. if (localStorage.getItem('seedchangeon') === 'true') {
  703. $('#seedchangeon').click();
  704. } else {
  705. $('#seedchangeon').prop('checked', false);
  706. }
  707. $('#seedxrolls').val(localStorage.getItem('seedxrolls'));
  708. if (localStorage.getItem('swapenabled') === 'true') {
  709. $('#swaprollsenabled').click();
  710. } else {
  711. $('#swaprollsenabled').prop('checked', false);
  712. }
  713. $('#swaprolls').val(localStorage.getItem('swapxrolls'));
  714. }
  715. chart = Highcharts.charts[0].series[0];
  716. chart2 = Highcharts.charts[0].series[1];
  717. loopenabled = false;
  718. loopcount = 0;
  719. $('#start').click(function () {
  720. if ($('#numrollsenabled').is(':checked') === true) {
  721. looptimes = $('#numrolls').val();
  722. } else {
  723. looptimes = 999999999;
  724. }
  725. if (loopenabled === false) {
  726. loopenabled = true;
  727. loop = setInterval(function () {
  728. if (loopcount >= looptimes) {
  729. clearInterval(loop);
  730. loopcount = 0;
  731. loopenabled = false;
  732. } else {
  733. if (betstarted === true) {} else {
  734. bet();
  735. }
  736. }
  737. }, betspeed);
  738. }
  739. });
  740. function removeTheme() {
  741. $('#paraDark').remove();
  742. }
  743. $('#stop').click(function () {
  744. clearInterval(loop);
  745. loopenabled = false;
  746. loopcount = 0;
  747. });
  748. $('#resetstats').click(function () {
  749. wins = 0;
  750. chart.setData([]);
  751. chart2.setData([]);
  752. losses = 0;
  753. profit = 0;
  754. currentloss = 0;
  755. addRow();
  756. wmultcount = 0;
  757. lmultcount = 0;
  758. });
  759. }
  760. setTimeout(function () {
  761. init2();
  762. }, 2000);

comments powered by Disqus