Autoclaim
Autoclaim
// *** Bonuses
var REWARDS = true; //decide if auto buy rewards bonuses, or not ***When true, it
will activate RP promotions***
var BONUS1000 = true; //decide if to buy 1000% bonus or not. It costs 4600 RP. ***
When BONUS1000 = false and REWARDS = true, you'll increase RP. ***
var HOURS_BETWEEN_BUY_BONUS = 48; // How many hours to wait before to buy Bonuses
Rewards Promo again
// *** Lottery
var LOTTERY = false; //decide if auto buy lottery tickets, or not. ***When true, It
will buy lottery tickets 7% of the times ***
var LOTTERY_MAX_TICKETS = 300; // Max ticket to buy
// *** MAX and MIN times for ROLLS, in MINUTES, Absolute Value
var MINUTES_TO_ROLL_MAX = 0;
var MINUTES_TO_ROLL_MIN = 0;
// ** Logging
var LOGGING = 5; //0 is no messages, 5 is debug
///////// END CONFIG ///
///////////////////////////////////////////////////////////////////////////////////
//////////////
// System Variables //
var css_reset='font-weight: reset; color:reset';
var css_bold='font-weight:bold;';
var script_output = "";
var script_output_msg_1 = "";
var script_output_msg_2 = "";
var script_output_msg_css = "";
var points=0;
var ads_closed=0; //number of ads closed, increasing
var rolling_mode="Day"; //night, day, promo, etc
var dateTimeFormat = new Intl.DateTimeFormat('en', { year: 'numeric', month:
'short', day: '2-digit', hour: 'numeric', minute: 'numeric', hour12: false });
var script_version = GM_info.script.version;
var isBonusActive = false;
var rand = 0;
var r = 0;
var d = new Date();
// END COOKIES //
(function() {
'use strict';
if (LOGGING > 0) console.log("%c<<<<<<<<<< Script Begin >>>>>>>>>>", 'font-
weight:bold; color: green');
// Lottery function
// It will plan to buy few lottery tickets, more less 7% of the times
lottery();
// Reward function
// it will call the roll function, that call the multiply function.
setInterval(function(){
// Close the reveals mode
closePopupInterval($('.close-reveal-modal'));
closePopupInterval($('.pushpad_deny_button'));
}, 30000);
)();
function panelInit () {
// Create the Div on the page
script_output_msg_css = "<style> #script_output {background: black; border: 2px
groove #09ff00; margin-bottom: 1em;} ";
script_output_msg_css += "#script_output .false {color: red;} #script_output
.true {color: lime;} ";
script_output_msg_css += "#script_output .script_output {color: white; font-
weight:normal; font-size: 0.7em} ";
script_output_msg_css += "#script_output_title_msg {font-size: 0.7em; color:
orange; text-align: right; position:absolute; right:0; top:0} ";
script_output_msg_css += "#script_output_title_msg span {line-height:1.2em;} ";
script_output_msg_css += "a {text-decoration:none;} ";
script_output_msg_css += "</style>";
function rewards() {
var bonustime = {};
var t = missingTime();
var _min = 20;
points = parseInt($('.user_reward_points').text().replace(',',""));
if ($("#bonus_container_free_points").length != 0) {
bonustime.text = $('#bonus_span_free_points').text();
bonustime.hour = parseInt(bonustime.text.split(":")[0]);
bonustime.min = parseInt(bonustime.text.split(":")[1]);
bonustime.sec = parseInt(bonustime.text.split(":")[2]);
bonustime.current = bonustime.hour * 3600 + bonustime.min * 60 +
bonustime.sec;
isBonusActive = true;
} else bonustime.current = 0;
if ($('#bonus_span_fp_bonus').length === 0)
if (points >= 4600 && Boolean(BONUS1000) ) {
if (LOGGING > 1) console.log("buying bonus 1000% roll");
setTimeout(function()
{ RedeemRPProduct('fp_bonus_1000')},random(15000,35000));
}
//Back to the main page
setTimeout(function(){ $
('.free_play_link').not('.hide_menu').click(); }, random(1000,3000));
if (Boolean(REWARDS)) { c1 = 'green'; }
else {
if (LOGGING > 3) console.log('Not buying RPBonuses. Not Active by
config');
$('#script_output_title_bonus_wait_hours').text('Not Active');
$
('#script_output_title_bonus_wait_hours').removeClass('true').addClass('false');
}
if (LOGGING > 3) console.log('Not buying RPBonuses: Setting Variable
is: %c'+Boolean(REWARDS)+' %c -- %c and missing minutes are: %c '+t[0]+'
%c(<'+min_before_roll+')', 'color:'+c1, 'color:reset; font-weight:bold', 'font-
weight: reset', 'color:'+c2, 'color:reset; font-weight:bold');
}
}
}
function Roll() {
var h = d.getHours();
if ($('#free_play_form_button').is(':visible') && ! $
('#play_without_captchas_button').is(':visible')) {
r=random(1,100);
$('body').focus();
if ( (h <= 6 || h>=22) && Boolean(NIGHT_MODE) ) { //from 22 to 7am
if (r <= 30) rand=random(2400000,7200000);
else rand=random(1000000,3600000);
rolling_mode="Night";
} else {
if (r <= 10) rand=random(9000,7200000); // 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
rolling_mode="Day";
}
if (Boolean(SLOW_MODE)) {
if (r <= 5) rand=random(3000,50000);
else if (r <= 20) rand=random(30000,1500000);
else if (r <= 40) rand=random(60000,2000000);
else rand=random(90000,3000000);
rolling_mode="Slow";
}
if (tot_btc_winning_rolling == 0) {
rand=random(1000,2000);
if (LOGGING > 2) console.log('>>>>> First Execution, fast ROLL');
}
$("#script_output_title_msg_mode").text(rolling_mode);
//rand = rand(1000,2000);
function captchaRoll() {
$('#play_without_captchas_button').click();
setTimeout(function(){
var cost_rp = $('.play_without_captcha_description span').text();
if (LOGGING > 2) console.log ("%cTry to play without captcha for
"+cost_rp+" RP points. You have "+points+" RP.", 'color:purple;');
if (points > cost_rp ) {
// ROLL anyway paying
if (LOGGING > 2) console.log ("Roll with Captcha");
$('#script_output_title_msg_roll').html('<span class="bold
true">Captcha OK</span>');
r=random(1,100);
if (r <= 10) rand=random(9000,7200000); // 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
rolling_mode="Captcha";
$("#script_output_title_msg_mode").text(rolling_mode);
if (tot_btc_winning_rolling == 0) {
rand=random(1000,2000);
if (LOGGING > 2) console.log('>>>>> First Execution, fast ROLL');
}
rand = random(500,60000);
rollAndRetrieve(rand);
} else {
if (LOGGING > 2) console.log ("%cNot enough RP. No Roll", 'color:
red');
$('#script_output_title_msg_roll').html('<span class="bold false">Miss
RP</span>'); // Status on page
}
}, random(1000,3000));
}
setTimeout(function(){
//Duplicate the visibility chek to avoid error when humans roll and don't
refresh.
if ( $('#free_play_form_button').is(':visible') ){
$('body').focus();
}, 6999);
}
else {
if (LOGGING > 3) console.log('Already Rolled..');
//Update Status on page
$('#script_output_title_msg_roll').html('<span class="false">Already
Rolled</span>'); // Status on page
setTimeout(function(){ location.reload(); }, 30000);
}
},rand);
function lottery () {
//Plan buying lottery ticket
if(Boolean(LOTTERY)){
var r=random(1,100);
var d = new Date();
var h = d.getHours();
if (r > 90 && h>=7) {
rand=random(1,LOTTERY_MAX_TICKETS).toFixed(0); //Tickets to buy
if (LOGGING > 2) console.log("Buy "+ rand + " lottery tickets in some
time....");
if(parseInt($('#balance').text().split(".")[1]) > rand) {
$('lottery_link hide_menu').click();
setTimeout(function(){
$('#lottery_tickets_purchase_count').val(rand);
setTimeout(function(){
if ( $('#lottery_tickets_purchase_count').val() <
LOTTERY_MAX_TICKETS ) {
$('#purchase_lottery_tickets_button').click();
if (LOGGING > 2) console.log("Bought "+ rand + "
lottery tickets");
}
}, random(2000,4000));
}, random(40000,120000));
}
}
}
}
function missingTime () {
var min = 0; var sec = 0; var str = "";
return [min,sec];
}
function random(min,max){
return min + (max - min) * Math.random();
}
if (target.is(':visible')) {
setTimeout(function(){
if (LOGGING > 3) console.log("%cClose ADS", 'color: grey');
target.click();
ads_closed ++;
$('#script_output_title_ads_closed_num').text(ads_closed);
}, random (500,120000));
} else {
//if (LOGGING > 4) console.log("%cNot visible: "+target.attr('id')+"
"+target.attr('class'), 'color: grey');
}
}
function closeRandomPopupInterval (target, randomness) {
var rand = random(1,100);
if (rand < randomness && target.is(':visible')) {
setTimeout(function(){
if (LOGGING > 3) console.log("%cClose Random ADS", 'color: grey');
target.click();
ads_closed ++;
$('#script_output_title_ads_closed_num').text(ads_closed);
}, random (500,120000));
} else {
//if (LOGGING > 4) console.log("%cNot visible: "+target.attr('id')+"
"+target.attr('class'), 'color: grey');
}
}
function showStatus(){
var t=missingTime();
var date = new Date();
var [{ value: month },,{ value: day },,{ value: year },,{ value: hour },,
{ value: minute }] = dateTimeFormat .formatToParts(date );
var ca='red'; var cb='red'; var cc='red'; var css='font-weight: bold; color:';
var c1='purple'; var c2='olive';
var c3='brown'; var c4='teal';
if (LOGGING > 0) console.log(">>>>>>>>>>%c Status:%c ["+hour+":"+minute+"]",
css_bold+'color:'+c1, css_bold);
//Rewards and multiply infos and colors
if (Boolean(REWARDS)) ca = 'green'; if (Boolean(MULTIPLY)) cb='green'; if
(Boolean(LOTTERY)) cc='green';
var cssa='font-weight: bold; color:'+ca;
var cssb='font-weight: bold; color:'+cb;
var cssc='font-weight: bold; color:'+cc;
if (LOGGING > 0) console.log(">>>>>>>>>> Buying Rewards:
"+"%c"+Boolean(REWARDS)+""+"%c; Playing Multiply: "+"%c"+Boolean(MULTIPLY)+""+"%c;
Buying Lottery: "+"%c"+Boolean(LOTTERY), cssa, css_reset,cssb, css_reset, cssc);
if (t[0] > 0 || t[1] > 0) {
if (LOGGING > 0) console.log(">>>>>>>>>> Missing "+"%c"+t[0]+" min "+t[1]+"
sec"+"%c for next roll",css_bold+"color:"+c1,css_reset);
}
// // Free Roll total Winnings via cookie
// var tot_btc_winning_rolling = getCookie('tot_btc_winning_rolling');
// var tot_lottery_winning_rolling = getCookie('tot_lottery_winning_rolling');
// var tot_rp_winning_rolling = getCookie('tot_rp_winning_rolling');
// if (! (tot_btc_winning_rolling > 0)) tot_btc_winning_rolling = 0;
// if (! (tot_lottery_winning_rolling > 0)) tot_lottery_winning_rolling = 0;
// if (! (tot_rp_winning_rolling > 0)) tot_rp_winning_rolling = 0;
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+ d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}