daily pastebin goal
10%
SHARE
TWEET

Untitled

a guest Sep 12th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var config = {
  2.   baseBet: { value: 35000, type: 'balance', label: 'base bet' },
  3.   payout: { value: 1.1, type: 'multiplier' },
  4.   stop: { value: 1e8, type: 'balance', label: 'stop if bet >' }
  5. };
  6.  
  7.  
  8. log('Script is running..');
  9.  
  10. var currentBet = config.baseBet.value;
  11. var lost = false;
  12. var amountWins = 0;
  13.  
  14. // Always try to bet when script is started
  15. engine.bet(roundBit(currentBet), config.payout.value);
  16.  
  17. engine.on('GAME_STARTING', onGameStarted);
  18. engine.on('GAME_ENDED', onGameEnded);
  19.  
  20. function onGameStarted() {
  21.   engine.bet(roundBit(currentBet), config.payout.value);
  22. }
  23.  
  24. function onGameEnded() {
  25.   var lastGame = engine.history.first()
  26.  
  27.   // If we wagered, it means we played
  28.   if (!lastGame.wager) {
  29.     return;
  30.   }
  31.  
  32.   // we won..
  33.   if (lastGame.cashedAt) {
  34.     amountWins = amountWins + 1;
  35.      
  36.     if (lost == true) {
  37.         lost = false;
  38.         currentBet = config.baseBet.value;
  39.         log('We won after a lost, so next bet will be', currentBet/100, 'bits')
  40.     } else {
  41.         if (amountWins == 5) {
  42.             currentBet = 45000;
  43.             log('We won 5 times, so next bet will be', currentBet/100, 'bits')
  44.             amountWins = 0;
  45.         } else {
  46.           currentBet = config.baseBet.value;
  47.           log('We won, so next bet will be', currentBet/100, 'bits')
  48.         }
  49.     }
  50.   } else {
  51.     amountWins = 0;
  52.     lost = true;
  53.     currentBet = currentBet * 2;
  54.    
  55.     log('We lost, so next bet will be', currentBet/100, 'bits')
  56.   }
  57.  
  58.   if (currentBet > config.stop.value) {
  59.     log('Was about to bet', currentBet, 'which triggers the stop');
  60.     engine.removeListener('GAME_STARTING', onGameStarted);
  61.     engine.removeListener('GAME_ENDED', onGameEnded);
  62.   }
  63. }
  64.  
  65. function roundBit(bet) {
  66.   return Math.round(bet / 100) * 100;
  67. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top