Untitled
unknown
plain_text
2 years ago
2.1 kB
17
Indexable
var config = {
baseBet: { value: 1, type: "balance", label: "Base Bet" },
targetProfit: { value: 50, type: "balance", label: "Target Profit" },
payout: { value: 2, type: "multiplier", label: "Payout Multiplier" },
betMultiplier: { value: 10, type: "multiplier", label: "Bet Multiplier" },
highBetMultiplier: { value: 10, type: "multiplier", label: "High Bet Multiplier" },
lowBetMultiplier: { value: 2, type: "multiplier", label: "Low Bet Multiplier" }
};
// Initialize variables
var currentBet = config.baseBet.value;
var currentPayout = config.payout.value;
// Main betting function
function main() {
log("Betting " + currentBet + " bits with payout " + currentPayout);
// Place bet
var betId = engine.bet(currentBet, currentPayout);
// 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!");
var profit = currentBet * (currentPayout - 1);
if (profit >= config.targetProfit.value) {
log("Target profit reached! Resetting.");
currentBet = config.baseBet.value;
currentPayout = config.payout.value;
} else {
// Increase payout for the next bet
currentPayout += 1;
}
} else {
log("Bet lost. Doubling bet amount.");
currentBet *= 2; // Double the bet amount
// Reset payout for the next bet
currentPayout = config.payout.value;
}
// Adjust bet amount based on outcome
if (currentPayout % config.betMultiplier.value == 0) {
currentBet *= config.highBetMultiplier.value; // Increase bet for a high bet
} else {
currentBet /= config.lowBetMultiplier.value; // Decrease bet for a low bet
}
main(); // Continue betting
});
}
// Start the betting loop
main();
Editor is loading...
Leave a Comment