Guest User

Untitled

a guest
Jan 15th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. var config = {};
  2.  
  3. var base_amount = 2, amount = base_amount;
  4. var losses = 1, vlosses = 21;
  5. var playing = true;
  6.  
  7. engine.on('GAME_STARTING', function () {
  8. if(playing) {
  9. log(losses + ' losses, betting with ' + amount.toFixed(4));
  10. engine.bet(parseInt(amount) * 100, 91);
  11. }
  12. });
  13.  
  14. engine.on('GAME_ENDED', function (game) {
  15. if(parseInt(game.bust) < 91){
  16. losses++;
  17.  
  18. amount = 0.97 * Math.exp(0.0112 * losses);
  19. amount = amount * 2;
  20. if (losses > 750){ playing = false; }
  21.  
  22. }else{
  23. playing = true;
  24. log('won ' + (parseInt(amount) * 91)+' bits, restarting');
  25. amount = base_amount;
  26. losses = vlosses = 1;
  27. }
  28. });
Advertisement
Add Comment
Please, Sign In to add comment