SHARE
TWEET

fix 2.0

a guest Jun 25th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const baseBet = 1;
  2.  
  3. const multiplier = 1.12;
  4.  
  5. let gameCounter = 0;
  6. let currentBet;
  7. let shouldRun = true;
  8.  
  9. engine.on('game_starting', function(info) {
  10.     console.info('Game number: '+ gameCounter +' Starting in ' + info.time_till_start/1000 + 's');
  11.  
  12.     console.info('calculating bet & bet multiplier...');
  13.     switch(gameCounter) {
  14.         case 0:
  15.             currentBet = baseBet;
  16.             break;
  17.         case 1:
  18.             currentBet = currentBet * 8.5;
  19.             break;
  20.         case 2:
  21.             currentBet = currentBet * 9.6;
  22.             break;
  23.         case 3:
  24.             currentBet = currentBet * 9.6;
  25.             break;
  26.         case 4:
  27.             currentBet = currentBet * 9.6;
  28.             break;
  29.         default:
  30.             currentBet = baseBet;
  31.             shouldRun = false;
  32.             gameCounter = 0;
  33.     }
  34.  
  35.     if(currentBet < engine.getBalance()){
  36.         if (shouldRun) {
  37.             console.info('betting: ' + currentBet + ' will cash out on: ' + multiplier);
  38.             engine.placeBet(Math.floor(currentBet) * 100, Math.round(multiplier * 100));
  39.         } else {
  40.             console.info('bet will not be placed on this game');
  41.         }
  42.     } else {
  43.         console.warn('balance limit reached betting that amount');
  44.         if (shouldRun) {
  45.             engine.placeBet(Math.floor(engine.getBalance()/100) * 100, Math.round(multiplier * 100));
  46.         } else {
  47.             console.info('bet will not be placed on this game');
  48.         }
  49.     }
  50. });
  51.  
  52. engine.on('game_started', function(data) {
  53.     if (shouldRun) gameCounter++;
  54.     else gameCounter = 0;
  55. });
  56.  
  57. engine.on('cashed_out', function(resp) {
  58.     if(resp.username == engine.getUsername() && shouldRun) {
  59.         console.info('cashed out on game: ' + gameCounter + ' restarting cycle...');
  60.         gameCounter = 0;
  61.     }
  62. });
  63.  
  64. engine.on('game_crash', function(data) {
  65.     if(!engine.lastGamePlayed()) gameCounter = 0;
  66. });
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