Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var bet = 5000;
- var increaseOnLoss = 6.6;
- var cashOut = 1.15;
- var waitForXredsToPlaceBet = 2;
- var waitForXcrash = 1.19;
- var stopScriptAfterXnumbersOfLostGames = 2;
- // script stops if X number of consecutive games are lost
- //-------------------------------------------------------------------
- var currentBet = bet;
- var reds = 0;
- var lostcount = 0;
- //-------------------------------------------------------------------
- engine.on('game_starting', function(info) {
- if (engine.lastGamePlay() == "LOST") {currentBet *= increaseOnLoss; lostcount++;}
- else{ if (engine.lastGamePlay() == "WON") {currentBet = bet; lostcount = 0;}}
- console.log('Reds =',reds);
- if (reds >= waitForXredsToPlaceBet && lostcount < stopScriptAfterXnumbersOfLostGames) {
- console.log('Placing bet of', Math.round(currentBet), 'at', Math.round(cashOut*100)/100);
- engine.placeBet(Math.round(currentBet)*100, Math.round(cashOut*100), false);
- }
- });
- engine.on('game_crash', function(data) {
- console.clear();
- if (data.game_crash/100 < waitForXcrash) {reds++;}
- else{reds = 0;}
- if (lostcount >= stopScriptAfterXnumbersOfLostGames) { engine.stop();}
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement