Advertisement
Guest User

Untitled

a guest
Feb 19th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. var bet = 5000;
  2. var increaseOnLoss = 1;
  3.  
  4. var cashOut = 1.25;
  5.  
  6. var waitForXredsToPlaceBet = 1;
  7. var waitForXcrash = 1.25;
  8.  
  9. var stopScriptAfterXnumbersOfLostGames = 2;
  10. // script stops if X number of consecutive games are lost
  11. //-------------------------------------------------------------------
  12.  
  13. var currentBet = bet;
  14. var reds = 0;
  15. var lostcount = 0;
  16.  
  17. //-------------------------------------------------------------------
  18.  
  19. engine.on('game_starting', function(info) {
  20.  
  21. if (engine.lastGamePlay() == "LOST") {currentBet *= increaseOnLoss; lostcount++;}
  22. else{ if (engine.lastGamePlay() == "WON") {currentBet = bet; lostcount = 0;}}
  23.  
  24. console.log('Reds =',reds);
  25.  
  26. if (reds >= waitForXredsToPlaceBet && lostcount < stopScriptAfterXnumbersOfLostGames) {
  27. console.log('Placing bet of', Math.round(currentBet), 'at', Math.round(cashOut*100)/100);
  28. engine.placeBet(Math.round(currentBet)*100, Math.round(cashOut*100), false);
  29. }
  30. });
  31.  
  32. engine.on('game_crash', function(data) {
  33.  
  34. console.clear();
  35.  
  36. if (data.game_crash/100 < waitForXcrash) {reds++;}
  37. else{reds = 0;}
  38.  
  39. if (lostcount >= stopScriptAfterXnumbersOfLostGames) { engine.stop();}
  40. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement