// --------------
// Stacey's gift to you all!
// Be sure to say thanks on the thread
var baseBet = Math.round(100/0.13);
var skip1 = 1; // after 3rd loss
var skip2 = 2; // after 4th loss
var skip3 = 1; // after 5th loss
var skip4 = 2; // after 6th loss
var skip5 = 6; // after 7th loss
var skip6 = 2; // after 8th loss
var skip7 = 3; // after 9th loss
var bet = baseBet * 150;
var cashOut = 1.14;
var currentBet = bet;
var startBalance = engine.getBalance();
var currentBalance = startBalance;
var losses = 0;var skip = 0;var lostGames = 0;var waitXgames = 0;var CO = 0;var winStreak = 0;result = 'No results yet. ';
var lossStreak = 0;
console.log('%c----------Start!----------', 'color: green; font-weight:bold')
engine.on('game_starting', function(info) {
if (currentBet && engine.lastGamePlay() == 'LOST') {
//if loss
lossStreak++;
lostGames++;
winStreak = 0;
currentBalance = engine.getBalance();
losses = startBalance - currentBalance;
currentBet *= 1.18; //bet increase on loss
cashOut = (losses / currentBet) + 1.14; //cashout multiplier increase on loss
if (lostGames >= 1) {
waitXgames = 0;
if (lostGames == 3) {skip = skip1;}
if (lostGames == 4) {skip = skip2;}
if (lostGames == 5) {skip = skip3;}
if (lostGames == 6) {skip = skip4;}
if (lostGames == 7) {skip = skip5;}
if (lostGames == 8) {skip = skip6;}
if (lostGames >= 9) {skip = skip7;}
}
} else {
//if win
currentBalance = engine.getBalance();
if (currentBalance > startBalance) {
winStreak++;
if (winStreak >= 2) {
currentBet *= 1.00; //bet increase on win
cashOut *= 1.00; //cashout increase on win
} else {
console.log('%cBetting Reset', 'color: green; font-weight:bold')
currentBet = bet; //reset betting on win
cashOut = 1.13;
}
startBalance = engine.getBalance();
lostGames = 0;
skip = 0;
//reset betting on 10 winStreak
if (winStreak % 7 === 0) {
console.log('%c7 wins', 'color: green; font-weight:bold')
console.log('%cBetting Reset', 'color: green; font-weight:bold')
currentBet = bet; //reset bet
cashOut = 1.13; //reset the cashout
}
}
}
if (currentBet && engine.lastGamePlay() == 'WON') {
lossStreak = 0;
}
if (waitXgames >= skip) {
if (currentBet && engine.lastGamePlay() == 'WON') {
console.log('%cYou win', 'color: green; font-weight:bold')
}
if (currentBet && engine.lastGamePlay() == 'LOST') {
console.log('%cYou lose', 'color: red; font-weight:bold')
}
if (winStreak > '1') {
console.log('Current win streak is', winStreak)
}
if (lossStreak > '1') {
console.log('Current loss streak is', lossStreak)
}
console.log('--------New Round--------')
console.log('', Math.floor(currentBet / 100), 'bits bet at', Math.round(cashOut * 100) / 100, 'x');
engine.placeBet(Math.floor(currentBet / 100) * 100, Math.floor(cashOut * 100), false);
} else {
console.log('--------New Round--------')
console.log('Cooling off. No bets this round.')
console.log('Current loss streak is', lossStreak)
winStreak = 0;
}
});
//detect Busted
engine.on('game_crash', function(data) {
if (data.game_crash / 100 >= CO) {
console.log('Game [Busted] at ' + (data.game_crash / 100) + 'x');
waitXgames++;
} else {
waitXgames++;
}
});