Professional Documents
Culture Documents
Multiplier 3 50,1
Multiplier 3 50,1
// @namespace https://greasyfork.org/users/583382
// ==/UserScript==
//Variables
var start_multiplier = '3';
var repeatCurrent = 0;
var stopped = false;
var startbalance=0;
var maxWait = 99;
var stopBefore = 1;
var startValue = 0.00000001;
var succg = 0;
var failg = 0;
var rollsmax = 0;
//Button triggers
var $loButton = $("#double_your_btc_bet_lo_button"), $hiButton = $
("#double_your_btc_bet_hi_button");
var $multiplier = $('#double_your_btc_payout_multiplier');
//----------//----------//----------//----------// STAKE
VALUES //----------//----------//----------//----------//
//Several presets given below, see also the stratergy calculator linked in
description //
//WARNING NON EXPONENTIAL NUMBERS - MUST BE CONVERTED TO BTC (1 = 0.00000001 btc)
//----------//----------//----------//----------//
FUNCTIONS //----------//----------//----------//----------//
function multiply() {
//Stake index
repeatCurrent++;
if (repeatCurrent > rollsmax){rollsmax = repeatCurrent} //Count highest
number of rolls played so far
if (repeatCurrent > maxTries){reset(); return $lobutton;} //reset if reach
end of stakes with no win - LOSE MONEY
//Set stake value based on repeat number (convert # to btc 1 = 0.00000001
btc)
stake = (number[repeatCurrent-1])*0.00000001;
$("#double_your_btc_stake").val(stake.toFixed(8));
$multiplier.val('3');
return $hiButton;
} //multiply end -----------------------
function stopGame() {
console.log("Game will stop soon! Let me finish.");
stopped = true;
}
function reset(multiplier) {
repeatCurrent = 0;
}
switch (comb) {
case 1:
characters = numbers;
break;
case 2:
characters = upperCaseLetters;
break;
case 3:
characters = lowerCaseLetters;
break;
case 4:
characters = numbers + upperCaseLetters;
break;
case 5:
characters = numbers + lowerCaseLetters;
break;
case 6:
characters = upperCaseLetters + lowerCaseLetters;
break;
default:
characters = numbers + upperCaseLetters + lowerCaseLetters;
randomString += characters.charAt(Math.floor(Math.random() *
characters.length));
return randomString;
//Checking if win/lost
$("#double_your_btc_bet_lose").bind("DOMSubtreeModified", function(event) {
if ($(event.currentTarget).is(':contains("lose")')) {
//Previous bet was lost
//Call multiply fn using variable, after random wait
var btn = multiply();
setTimeout(function() {btn.trigger("click");}, getRandomWait());
}
});
$("#double_your_btc_bet_win").bind("DOMSubtreeModified", function(event) {
if ($(event.currentTarget).is(':contains("win")')) {
//Previous bet was won
//Stop if near reload
if (stopBeforeRedirect()) {
return;
}
//Count games won max profit
if (repeatCurrent > npnumber){failg++;}
else{succg++;}
//Reload page if rolled close to max
if(rollsmax > (maxTries-2)){window.location.reload(); reset();
startGame(); };
//-----------------//----------------//-----------------// STAT
UPDATE //----------------//-----------------//----------------//
//Stat config values//
let isBetButtonClicked = false;
let rollsCount = 0;
let starterBalance = 0;
let statTableExists = false;
let rollStat = {
update: function() {
let currentBalance = (Number(parseFloat(id('balance').textContent)) +
Number(parseFloat(id('bonus_account_balance').textContent))).toFixed(8);
let profit = (currentBalance - starterBalance).toFixed(8);
rollsCount += 1;
//Stat values
if (statTableExists === false) this.setTable(currentBalance);
id('stat-rolls-count').innerHTML = '<span style="color:#039">Rolls
played : </span>' + rollsCount;
id('stat-starter-balance').innerHTML = '<span style="color:#039">Starter
balance : </span>' + starterBalance;
id('stat-current-balance').innerHTML = '<span style="color:#039">Current
balance : </span>' + currentBalance;
id('stat-profit1').innerHTML = '<span style="color:#039">Profit : </span>'
+ profit;
id('stat-profit2').innerHTML = '<span style="color:#039"># Max :
</span>' + succg; //number of games with high profit
id('stat-profit3').innerHTML = '<span style="color:#039"># Min :
</span>' + failg; //number with min profit
id('stat-rollsmax').innerHTML = '<span style="color:#039">Highest roll
#: </span>' + rollsmax + '/' + maxTries; //Most rolls played in one game
},
setTable: function(currentBalance){
id('double_your_btc_main_container_outer').insertAdjacentHTML('afterend',
'<table style = "border:none;background:none; width:968px; text-align:center; font-
weight:bold;margin-bottom:0px;font-size:14px;color:#333"><tr
style="padding:0px;height:36px;line-height:36px"><td id="stat-rolls-count"><span
style="color:#039">Rolls played : </span>' + rollsCount + '</td><td id="stat-
starter-balance"><span style="color:#039">Starter balance : </span>' +
starterBalance + '</td><td id="stat-current-balance"><span
style="color:#039">Current balance : </span>' + currentBalance + '</td><td
id="stat-profit2"><span style="color:#039"># won max : </span>' + succg + '</td><td
id="stat-profit3"><span style="color:#039"># won min : </span>' + failg + '</td><td
id="stat-rollsmax"><span style="color:#039">Most lost : </span>' + rollsmax +'/'+
maxTries + '</td><td id="stat-profit1"><span style="color:#039">Profit : </span>' +
(currentBalance - starterBalance).toFixed(8) );
statTableExists = true;
}
};
id('double_your_btc_bet_hi_button').addEventListener("DOMSubtreeModified",
function() {
init('hi');
});
id('double_your_btc_bet_lo_button').addEventListener("DOMSubtreeModified",
function() {
init('lo');
});
starterBalance = (Number(parseFloat(id('balance').textContent)) +
Number(parseFloat(id('bonus_account_balance').textContent))).toFixed(8);
rollStat.setTable(starterBalance);
//----------------//----------------//
START //--------------//----------------//---------------//----------------//------
------------------------------------------
startGame();