Advertisement
Guest User

Untitled

a guest
May 26th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.28 KB | None | 0 0
  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.         pausefor--;
  27.         return;
  28.     }
  29.     if (lastlost) {
  30.         lossStreak++;
  31.         currentBet *= config.martin.value;
  32.         if (lossStreak >= 35) {
  33.             lastlost = false;
  34.             return;
  35.         }
  36.     } else {
  37.         currentBet = config.bet.value;
  38.         currentMultiplier = config.payout.value;
  39.         lossStreak = 0;
  40.         if(!firstgame) {
  41.             pausefor = config.pause.value;
  42.             firstgame = false;
  43.         }
  44.     }
  45.     engine.bet(currentBet, currentMultiplier);
  46. });
  47.  
  48. engine.on('GAME_ENDED', function() {
  49.     var lastGame = engine.history.first();
  50.     if (lastGame.bust >= config.multiplier.value) {
  51.         paused = false;
  52.         pausefor = config.pause.value;
  53.     }
  54.     if (!lastGame.wager) {
  55.         return;
  56.     }
  57.     if (lastGame.cashedAt) {
  58.         lastlost = false
  59.     } else {
  60.         lastlost = true;
  61.     }
  62. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement