Freebitco Auto Faucet

Auto Faucet Script by CodeFred

当前为 2020-12-21 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name Freebitco Auto Faucet
// @description Auto Faucet Script by CodeFred
// @author CodeFred
// @version 2
// @namespace mailto:[email protected]
// @match https://freebitco.in/*
// @grant none
// ==/UserScript==

/* globals jQuery, $, waitForKeyElements */

setTimeout(function(){
    'use strict';

    //Buys lottery while captcha is required
    if($('#free_play_captcha_container').is(':visible')){
        console.log("CAPTCHA IS NOT OFF");
        buy_lotery();
    }
    else {
        // Roll for BTC
        if ($('#free_play_form_button').is(':visible')) {
            setTimeout(function(){
                select_reward();
                setTimeout(function(){
                    $('#free_play_form_button').click();
                    setTimeout(function(){
                        var i = parseInt($('#winnings').text().split(".")[1]);
                        console.log("satoshis earned: ", i);
                    },2000);
                },2000);
            },1000);
        }

        if ($('.close-reveal-modal').is(':visible')) {
            setTimeout(function(){ $('.close-reveal-modal').click(); },2000);
        }
    }
    // Reloads page to ensure no errors occure
    setTimeout(function(){ location.reload(); }, 10*60*1000);
},2000);

function buy_lotery() {
    if(parseInt($('#balance').text().split(".")[1])>100){
        $('#lottery_tickets_purchase_count').val("100");
        $('#purchase_lottery_tickets_button').click();
        location.reload();
    }
}
function select_reward() {
    var reward = {};
    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;
    }

    if (reward.bonustime.current === 0) {
        console.log("Reward point bonus expired, points availible: ", reward.points);
        if (reward.points < 12) {
            console.log("waiting for points");
        }
        else if (reward.points < 120) {
            RedeemRPProduct('free_points_1');
        }
        else if (reward.points < 300) {
            RedeemRPProduct('free_points_10');
        }
        else if (reward.points < 600) {
            RedeemRPProduct('free_points_25');
        }
        else if (reward.points < 1200) {
            RedeemRPProduct('free_points_50');
        }
        else {
            RedeemRPProduct('free_points_100');
        }
    }
    if ($('#bonus_span_fp_bonus').length === 0) {
        if (reward.points >= (4400 - (reward.bonustime.hour*102))) {
            console.log("Free BTC bonus expired, buying new");
            RedeemRPProduct('fp_bonus_1000');
        }
    }
};