Professional Documents
Culture Documents
Need Testing.
Need Testing.
Need Testing.
////////////
// CONFIG //
////////////
// >>>>>>>>>>>>>> //
var MULTIPLY = false; //decide if play Multiply games or not ***It's a doubling
technique. Play at your risk *** ***When true, it's played randomly***
var MAX_ROLLS_AT_MULTIPLY = 1000; //how many rolls in multiply.
var REWARDS = true; //decide if auto buy rewards, or not, incrementally. ***When
true, it will activate RP promotions***
var LOTTERY = false; //decide if auto buy lottery tickets, or not. ***When true, It
will randomly buy lottery tickets, # between 4000 and 7000***
var LOGGING = 5; //0 is no messages, 5 is debug
// <<<<<<<<<<<<<< //
// System Variables //
// >>>>>>>>>>>>>>>> //
var css_reset='font-weight: reset; color:reset';
var css_bold='font-weight:bold;';
// <<<<<<<<<<<<<<<< //
(function() {
'use strict';
// Reward function call the roll function, that call the multiply function.
var reward = {};
reward.select = function() {
reward.points = parseInt($('.user_reward_points').text().replace(',',""));
reward.bonustime = {};
if ($("#bonus_container_free_points").length != 0) {
reward.bonustime.text = $('#bonus_span_free_points').text();
reward.bonustime.hour = parseInt(reward.bonustime.text.split(":")[0]);
reward.bonustime.min = parseInt(reward.bonustime.text.split(":")[1]);
reward.bonustime.sec = parseInt(reward.bonustime.text.split(":")[2]);
reward.bonustime.current = reward.bonustime.hour * 3600 +
reward.bonustime.min * 60 + reward.bonustime.sec;
} else reward.bonustime.current = 0;
//Save distance from last 8888 on cookie to check when to play Jackpot
$('#previous_roll').on('DOMSubtreeModified', function(){
var rolled = $('#previous_roll').html();
if (rolled > 0 && rolled <= 10000 && rolled != 8888){
//console.log('new value '+ rolled);
totJack++;
setCookie("totJack", totJack, "365");
setCookie("prevNum", rolled, "365");
//console.log(document.cookie);
} else if (rolled == 8888) {
setCookie("totJack", 0, "365");
setCookie("prevNum", rolled, "365");
if (LOGGING > 0) console.log("************** 8888 Jackpot!
**************");
}
});
// The reward function call the others functions, cause the order is: buy
bonus, free roll, play multiply, reload page, etc.
setTimeout(reward.select,random(1500,3500));
)();
function missingTime () {
var min = 0; var sec = 0; var str = "";
function freeRoll() {
var d = new Date();
var rand=0;
var r=0;
var tot_btc_winning_rolling = getCookie('tot_btc_winning_rolling');
if (! (tot_btc_winning_rolling > 0)) tot_btc_winning_rolling=0;
if ($('#free_play_form_button').is(':visible') && ! $
('#play_without_captchas_button').is(':visible')) {
r=random(1,100);
var h = d.getHours();
if (h <= 6) rand=random(900000,3600000); //from midnight to 6am
else {
if (r <= 10) rand=random(9000,3600000); // xx%, long wait, more
than hour
else if (r <= 30) rand=random(6000,1800000); // long but not longest
else if (r <= 71) rand=random(3000,1200000); // xx% cases medium
else rand=random(500,60000); // xx% cases fast roll
}
if (reward.bonustime.current !== 0) { //If promo is active, roll faster
if (r <= 10) rand=random(3000,360000); //one time on ten it will
be slower
else rand=random(500,60000); //then faster
}
//if (! Boolean(REWARDS) ) rand=rand+random(5000,900000); // human behave
if (LOGGING > 2) console.log('++++++++++++++++++++++++++++++Will roll in
'+rand/1000/60+' minutes;');
if (LOGGING > 4) console.log('hour:'+h+'; r:'+r);
setTimeout(function(){ $
('.free_play_link').not('.hide_menu').click();},1800);
setTimeout(function(){
//Duplicate the visibility chek to avoid error when humans roll and
don't refresh.
if ($('#free_play_form_button').is(':visible') && ! $
('#play_without_captchas_button').is(':visible')){
if (LOGGING > 2) console.log('+++++++++++++++++++++++++++++
+ROLL!');
$('#free_play_form_button').click();
setTimeout(function(){
var win_btc = $('#winnings').text();
var win_lottery = $('#fp_lottery_tickets_won').text();
var win_rp = $('#fp_reward_points_won').text();
if (win_btc > 0) {
if (LOGGING > 2) console.log('Got '+win_btc+' btc,
'+win_lottery+' tickets and '+win_rp+' RP!');
if (LOGGING > 4) console.log(">> DEBUG:
"+tot_btc_winning_rolling+" -- "+win_btc+" --
"+parseFloat(tot_btc_winning_rolling));
tot_btc_winning_rolling =
parseFloat(parseFloat(tot_btc_winning_rolling) + parseFloat(win_btc)).toFixed(8);
if (LOGGING > 4) console.log(">> DEBUG:
"+tot_btc_winning_rolling);
setCookie('tot_btc_winning_rolling',
tot_btc_winning_rolling, 365);
} else {
if (LOGGING > 1) console.log(''+'%cSome error retrieving
Roll Winnings. Winning was: '+win_btc, 'color: red');
}
}, 6999);
}
else {
if (LOGGING > 3) console.log('Already Rolled..');
setTimeout(function(){ location.reload(); }, 3000);
}
},rand);
var rand1=rand+random(900000,1800000);
rand=random(0,1000);
if (rand < 500) {
if (LOGGING > 2) console.log('Reload page after roll in
'+rand1/1000/60+' minutes!');
setTimeout(function(){ location.reload(); }, rand1);
} else if (rand > 900 && Boolean(MULTIPLY)) {
if (LOGGING > 0) console.log('Will multiply in '+rand1/1000/60+'
minutes!');
setTimeout(function(){ multiply(); }, rand1);
} else {
if (LOGGING > 2) console.log('No action after roll. Rand was '+rand);
}
} else {
if (LOGGING > 2) console.log("No roll");
}
}