Bustabit script, from $1 to $100


SUBMITTED BY: staceyjones90

DATE: Oct. 23, 2016, 5:17 p.m.

FORMAT: Text only

SIZE: 1.0 kB

HITS: 920

  1. var baseBet = 10; // in Bits
  2. var cashout;
  3. var mult;
  4. // set one of mult or cashout, and the other will be calculated for you:
  5. // mult = 1.12;
  6. cashout = 1.5;
  7. // what percentage to increase the net profit by each time we lose a bet; 0 for pure martingale
  8. greed_percent = 5;
  9. if (!mult)
  10. mult = cashout / (cashout - 1) * (1 + greed_percent/100);
  11. else if (!cashout)
  12. cashout = mult / (mult - 1) * (1 + greed_percent/100);
  13. var satoshis = baseBet * 100;
  14. var crash = Math.floor(cashout*100 + 1e-6);
  15. var currentBet = false;
  16. engine.on('game_starting', function () {
  17. if (currentBet && engine.lastGamePlay() === 'LOST')
  18. currentBet *= mult;
  19. else
  20. currentBet = satoshis;
  21. if (currentBet < engine.getBalance()) {
  22. console.log('place bet of', Math.round(currentBet/100), 'at', crash/100);
  23. engine.placeBet(Math.round(currentBet/100)*100, crash, false);
  24. }
  25. else {
  26. engine.stop();
  27. console.log('You ran out of bits :(');
  28. }
  29. });

comments powered by Disqus