Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var baseBet = 10;
  2. var Multiplier = 1.25
  3. var IncreasingMultiplier = [1.30, 2];
  4. var increaseOnLoss = [1.50, 1.75, 2.00, 2.25, 2.50, 2,75, 3.00];
  5.  
  6. var maxLosses = 500;
  7.  
  8. //-----------------------------------------------------------------------
  9.  
  10. var currentBet = baseBet;
  11. var cashOut = Multiplier;
  12. var n = 0;
  13.  
  14. var startBR = engine.getBalance();
  15. var currentBR = startBR;
  16. var sessionBR = startBR;
  17.  
  18. //-----------------------------------------------------------------------
  19.  
  20. engine.on('game_starting', function(info) {
  21.  
  22. currentBR = engine.getBalance();
  23.  
  24.     if (engine.lastGamePlay() == "LOST") {
  25.    
  26.         n += 1;
  27.        
  28.         if (n > increaseOnLoss.length) {n = 0;}
  29.        
  30.         currentBet *= increaseOnLoss[n];
  31.         cashOut = IncreasingMultiplier[n];
  32.         console.log('n =', n);
  33.     }
  34.     else{
  35.    
  36.         currentBet = baseBet;
  37.         n = 0;
  38.         startBR = currentBR;
  39.     }
  40.     engine.placeBet(Math.round(currentBet * 100), Math.round(cashOut * 100), false);
  41.     console.log('Placing bet of', Math.round(currentBet), 'at', Math.round(cashOut * 100) / 100 + "x");
  42. });
  43.  
  44. engine.on('game_crash', function(data) {
  45.  
  46. currentBR = engine.getBalance();
  47.  
  48.     if (startBR - currentBR > maxLosses * 100) { engine.stop(); }
  49.    
  50.     console.log('-------------------');
  51.     console.log('Current profit/losses =', (currentBR-startBR)/100);
  52.     console.log('Session Profit/Losses =', Math.round(currentBR - sessionBR)/100);
  53. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement