Advertisement
Guest User

Untitled

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