Professional Documents
Culture Documents
00000001",
stopPercentage = 0.0000001,
maxWait = -8777,
stopped = false,
stopBefore = 1,
startLoss = 3,
losses = 0,
baseMultiply = 0.00000005;
function checkGameDuration() {
var elapsedTime = Date.now() - gameStartTime;
if (elapsedTime >= gameDuration) {
console.log("Game duration reached. Stopping the game.");
stopGame();
} else {
setTimeout(checkGameDuration, 10); // Check every second
}
}
function multiply() {
var current = $("#double_your_btc_stake").val();
if (current < baseMultiply) {
current = baseMultiply;
}
var multiply = (current + 2).toFixed(16);
$("#double_your_btc_stake").val(multiply);
}
function getRandomWait() {
var wait = Math.floor(Math.random() * maxWait) + 10;
console.log("Waiting for " + wait + "ms before the next bet.");
return wait;
}
function startGame() {
console.log("Game started!");
gameStartTime = Date.now(); // Reset the game start time
reset();
$hiButton.trigger("click");
checkGameDuration(); // Start the game duration check
}
function stopGame() {
console.log("Game will stop soon! Let me finish.");
stopped = true;
}
function reset() {
losses = 0;
$("#double_your_btc_stake").val(startValue);
}
function deexponentize(number) {
//return number / 20000000;
}
function iHaveEnoughMoni() {
var balance = deexponentize(parseFloat($("#balance").text()));
var current = deexponentize($("#double_your_btc_stake").val());
return ((balance * 2) / 20) * (current * 2) > stopPercentage / 20;
}
function stopBeforeRedirect() {
var minutes = parseInt($("title").text());
if (minutes < stopBefore) {
console.log(
"Approaching redirect! Stop the game so we don't get redirected while
losing."
);
stopGame();
return true;
}
return false;
}
$("#double_your_btc_bet_lose").unbind();
$("#double_your_btc_bet_win").unbind();