Primedice 3
Primedice 3
autobet_speed = 500,
normalbet_speed = 500,
id = 0,
timedCount, timer, lastYourBet = 0,
lastAllBet = 0,
lastBigBet = 0,
autobet_halt, first_load = true,
autobet_index = false,
prev_balance = 0,
bet_ids = [];
$tableod.find('tr:first').clone().addClass('placeholder').prependTo($tableod);
top = -(count * 34) - 34;
new_top = -34;
} else {
top = -(count * 34);
new_top = 0;
}
$tableod.css('top', top);
$tableod.find('tr:gt(30)').addClass('removing');
$table.replaceWith($tableod);
$tableod.stop().animate({
'top': new_top
});
$tableod.find('tr.removing').animate({
opacity: 0
}, function () {
$(this).remove();
});
console.log($tableod.find('tr:first').is('.placeholder') ? 'Has Placeholder' :
'No Placeholder');
}
function updateYourBets() {
$.ajax({
url: '/api/get_bets.php',
data: {
id: parseInt($('#user-id').text()),
count: '30',
bet_id: lastYourBet
},
type: 'post',
dataType: 'json',
success: function (data) {
if (!data || data.length === 0) return;
lastYourBet = data[0].bet_id;
addRows($('#table-1'), data);
}
});
}
function updateBigBets(callback) {
$.ajax({
url: '/api/get_bets.php',
data: {
value: '.5',
count: '30',
bet_id: lastBigBet
},
type: 'post',
dataType: 'json',
success: function (data) {
if (!data || data.length === 0) return;
lastBigBet = data[0].bet_id;
addRows($('#table-3'), data);
},
complete: function () {
if (typeof callback == 'function') callback();
}
});
}
function updateBalance(checker) {
$.ajax({
url: '/api/get_balance.php',
dataType: 'json',
success: function (data) {
$('#balance').val(data.balance);
$('#balance-value').text(data.balance);
},
complete: checker
});
}
function update(callback) {
var did_count = 0,
checked = function () {
did_count++;
if (did_count == 4 && typeof callback == 'function') callback();
}
updateStats(checked);
updateAllBets(checked, first_load);
updateBigBets(checked);
updateBalance(checked);
first_load = false;
}
function updateStats(checked) {
$.ajax({
url: '/api/stats.php',
type: 'get',
dataType: 'json',
success: function (data) {
$('#stats-wagered').text(data.wagered);
$('#stats-bets').text(data.bets);
$('#stats-bank').text(data.bank);
},
complete: checked
})
}
params = {
odds: 50.50,
type: 0,
bet: 0.00000020,
total_runs: 10000,
security_steps: 6,
on_loss_return: false,
on_loss_multiply: 2,
on_win_return: true,
on_win_multiply: false,
current_run: 0,
current_bet: 0
};
params.current_bet = params.bet;
autobet_halt = false;
autobet_index = 0;
auto_bet(params);