Bustabit Special Bot


SUBMITTED BY: bakhajan

DATE: Sept. 14, 2016, 5:36 p.m.

FORMAT: Text only

SIZE: 2.8 kB

HITS: 1322

  1. // Bustabit Special Bot
  2. // By: Spiocha & MartinG
  3. // Version 2
  4. // A martingale that pauses and continues when the game crashes above certain thresholds
  5. /******************/
  6. var baseBet = 2;
  7. var multiplier = 3;
  8. var cashout = 1.22;
  9. var pauseThreshold = 10; // when game crashes above this, betting pauses
  10. var continueThreshold = 2; // when paused and the game crashes above this, betting resumes
  11. var pauseAfterNLosses = 10;
  12. var pauseForMGames = 5;
  13. /******************/
  14. baseBet = Math.round(baseBet) * 100;
  15. cashout = Math.round(cashout * 100);
  16. pauseThreshold = Math.round(pauseThreshold * 100);
  17. continueThreshold = Math.round(continueThreshold * 100);
  18. var currentGameData;
  19. var lastCrash = cashout;
  20. var lostLast = false;
  21. var paused = false;
  22. var bet = baseBet;
  23. var pauseLossStreak = 0;
  24. var pausedFor = 0;
  25. engine.on('game_started', function(data) {
  26. currentGameData = data;
  27. });
  28. engine.on('game_starting', function(info) {
  29. console.log(lastCrash, pauseThreshold);
  30. if(lastCrash >= pauseThreshold) {
  31. paused = true;
  32. console.log("Pausing Betting");
  33. return;
  34. }
  35. if(paused) {
  36. if(lastCrash >= continueThreshold) {
  37. console.log("Continuing Betting");
  38. lastCrash = cashout;
  39. paused = false;
  40. } else {
  41. console.log("Betting Is Paused");
  42. return;
  43. }
  44. }
  45. /********************/
  46. if(pausedFor > 0) {
  47. pausedFor++;
  48. if(pausedFor <= pauseForMGames) {
  49. console.log("Paused " + pausedFor + " of " + pauseForMGames + " games");
  50. return;
  51. } else {
  52. console.log("Resuming");
  53. pausedFor = 0;
  54. pauseLossStreak = 0;
  55. }
  56. }
  57. if(pauseLossStreak >= pauseAfterNLosses) {
  58. console.log("Pausing for 1 of " + pauseForMGames + " games");
  59. pausedFor = 1;
  60. return;
  61. }
  62. /********************/
  63. if(lastCrash >= cashout) {
  64. bet = baseBet;
  65. } else {
  66. bet = bet * multiplier;
  67. }
  68. console.log("Betting " + Math.round(bet/100));
  69. engine.placeBet(Math.round(bet), cashout);
  70. });
  71. engine.on('game_crash', function(data) {
  72. lastCrash = data.game_crash;
  73. if (!currentGameData || !currentGameData.hasOwnProperty(engine.getUsername())) {
  74. return;
  75. };
  76. lostLast = engine.lastGamePlay() == 'LOST';
  77. /********************/
  78. if(!lostLast) {
  79. pauseLossStreak = 0;
  80. } else {
  81. pauseLossStreak++;
  82. }
  83. /********************/
  84. });

comments powered by Disqus