Paid script


SUBMITTED BY: spyder0896

DATE: April 27, 2020, 7:07 p.m.

FORMAT: Text only

SIZE: 1.1 kB

HITS: 677

  1. //Bustabit paid script
  2. var config = {
  3. bet: { value: 100, type: 'balance', label: 'Initial Bet' },
  4. cashOut: { value: 2, type: 'multiplier' },
  5. };
  6. var sessionLoss = 0;
  7. var betSize = config.bet.value;
  8. engine.bet(betSize, config.cashOut.value);
  9. engine.on('GAME_STARTING', onGameStarted);
  10. engine.on('GAME_ENDED', onGameEnded);
  11. function onGameStarted() {
  12. engine.bet(betSize, config.cashOut.value);
  13. }
  14. function onGameEnded() {
  15. var lastGame = engine.history.first()
  16. if (!lastGame.wager) {
  17. return;
  18. }
  19. // won
  20. if (lastGame.cashedAt) {
  21. sessionLoss = sessionLoss + betSize;
  22. if (sessionLoss > config.bet.value) {
  23. log('Cicle ended starting a new one ...');
  24. betSize = config.bet.value;
  25. sessionLoss = 0;
  26. } else {
  27. if (sessionLoss + betSize > config.bet.value) {
  28. betSize = Math.abs(config.bet.value - sessionLoss);
  29. } else {
  30. betSize = betSize + config.bet.value;
  31. }
  32. }
  33. } else {
  34. // lost
  35. sessionLoss = sessionLoss - betSize;
  36. betSize = config.bet.value;
  37. }
  38. }

comments powered by Disqus