Untitled
unknown
plain_text
2 years ago
1.9 kB
11
Indexable
// Configuration
var config = {
baseBet: { value: 1, type: "balance", label: "Base Bet" },
targetProfitPerRounds: { value: 1000, type: "balance", label: "Target Profit per Rounds" },
roundsBeforeProfit: { value: 10, type: "text", label: "Rounds Before Profit" },
};
// Initialize variables
var currentBet = config.baseBet.value;
var roundsSinceProfit = 0;
var isIncreasingBet = true;
// Main betting function
function main() {
log("Betting " + currentBet + " bits");
// Place bet
var betId = engine.bet(currentBet, 100);
// Wait for the bet result
engine.on('GAME_STARTING', function() {
log("Game started. Waiting for result...");
});
engine.on('GAME_ENDED', function(data) {
if (data.cashed_at) {
log("Bet won!");
if (isIncreasingBet) {
// If bet was increasing, profit achieved
roundsSinceProfit++;
if (roundsSinceProfit >= config.roundsBeforeProfit.value) {
log("Target rounds reached! Making profit.");
engine.bet(config.targetProfitPerRounds.value, 2); // Bet for profit
roundsSinceProfit = 0; // Reset rounds counter
}
} else {
// If bet was decreasing, reset rounds counter
roundsSinceProfit = 0;
}
isIncreasingBet = !isIncreasingBet; // Toggle bet direction
} else {
log("Bet lost. Adjusting bet amount.");
// Double or halve the bet amount based on current direction
currentBet = isIncreasingBet ? currentBet * 2 : currentBet / 2;
roundsSinceProfit = 0; // Reset rounds counter
isIncreasingBet = !isIncreasingBet; // Toggle bet direction
}
main(); // Continue betting
});
}
// Start the betting loop
main();
Editor is loading...
Leave a Comment