Advertisement
Guest User

Untitled

a guest
May 26th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var config = {
  2.     bet: {
  3.         value: 23000, type: 'balance', label: 'Bet'},
  4.     payout: {
  5.         value: 10, type: 'multiplier', label: 'Payout' },
  6.     martin: {
  7.         value: 1.11, type: 'multiplier', label: 'Martin' },
  8.     pause: {
  9.         value: 20, type: 'text', label: 'Pause For' }
  10. };
  11.  
  12. var lastlost = false;
  13. var currentBet = config. bet.value;
  14. var currentMultiplier = config. bet.value;
  15. var lossStreak = 0;
  16. var pausefor = 0;
  17. var templastlost = false;
  18. var firstgame = true
  19. var paused = true;
  20.  
  21. engine.on('GAME_STARTING', function() {
  22.     if (paused) {
  23.         return;
  24.     }
  25.     if (pausefor > 0) {
  26.         log('Pause For ', pausefor, 'Games')
  27.         pausefor--;
  28.         return;
  29.     }
  30.     if (lastlost) {
  31.         lossStreak++;
  32.         currentBet *= config.martin.value;
  33.         if (lossStreak >= 35) {
  34.             lastlost = false;
  35.             return;
  36.         }
  37.     } else {
  38.         currentBet = config.bet.value;
  39.         currentMultiplier = config.payout.value;
  40.         lossStreak = 0;
  41.         if(!firstgame) {
  42.             pausefor = config.pause.value;
  43.             firstgame = false;
  44.         }
  45.     }
  46.     engine.bet(currentBet, currentMultiplier);
  47. });
  48.  
  49. engine.on('GAME_ENDED', function() {
  50.     var lastGame = engine.history.first();
  51.     if (lastGame.bust >= config.payout.value) {
  52.         log('Start After ', config.pause.value, 'Games')
  53.         paused = false;
  54.         pausefor = config.pause.value;
  55.     }
  56.     if (!lastGame.wager) {
  57.         return;
  58.     }
  59.     if (lastGame.cashedAt) {
  60.         lastlost = false
  61.     } else {
  62.         lastlost = true;
  63.     }
  64. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement