MartinBot

Bustabit Spiocha Special Bot

Mar 21st, 2016
704
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.41 KB | None | 0 0
  1. // Bustabit Spiocha 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. /******************/
  7.  
  8. var baseBet = 2;
  9. var multiplier = 3;
  10. var cashout = 1.22;
  11.  
  12. var pauseThreshold = 10; // when game crashes above this, betting pauses
  13. var continueThreshold = 2; // when paused and the game crashes above this, betting resumes
  14.  
  15. var pauseAfterNLosses = 2;
  16. var pauseForMGames = 5;
  17.  
  18. /******************/
  19.  
  20. baseBet = Math.round(baseBet) * 100;
  21. cashout = Math.round(cashout * 100);
  22. pauseThreshold = Math.round(pauseThreshold * 100);
  23. continueThreshold = Math.round(continueThreshold * 100);
  24.  
  25. var currentGameData;
  26.  
  27. var lastCrash = cashout;
  28. var lostLast = false;
  29.  
  30. var paused = false;
  31. var bet = baseBet;
  32.  
  33. var pauseLossStreak = 0;
  34. var pausedFor = 0;
  35.  
  36. engine.on('game_started', function(data) {
  37. currentGameData = data;
  38. });
  39.  
  40. engine.on('game_starting', function(info) {
  41.  
  42. console.log(lastCrash, pauseThreshold);
  43.  
  44. if(lastCrash >= pauseThreshold) {
  45. paused = true;
  46. console.log("Pausing Betting");
  47. return;
  48. }
  49.  
  50. if(paused) {
  51. if(lastCrash >= continueThreshold) {
  52. console.log("Continuing Betting");
  53. lastCrash = cashout;
  54. paused = false;
  55. } else {
  56. console.log("Betting Is Paused");
  57. return;
  58. }
  59. }
  60.  
  61. /********************/
  62.  
  63. if(pausedFor > 0) {
  64. pausedFor++;
  65. if(pausedFor <= pauseForMGames) {
  66. console.log("Paused " + pausedFor + " of " + pauseForMGames + " games");
  67. return;
  68. } else {
  69. console.log("Resuming");
  70. pausedFor = 0;
  71. pauseLossStreak = 0;
  72. }
  73. }
  74.  
  75. if(pauseLossStreak >= pauseAfterNLosses) {
  76. console.log("Pausing for 1 of " + pauseForMGames + " games");
  77. pausedFor = 1;
  78. return;
  79. }
  80.  
  81. /********************/
  82.  
  83. if(lastCrash >= cashout) {
  84. bet = baseBet;
  85. } else {
  86. bet = bet * multiplier;
  87. }
  88.  
  89. console.log("Betting " + Math.round(bet/100));
  90.  
  91. engine.placeBet(Math.round(bet), cashout);
  92.  
  93. });
  94.  
  95. engine.on('game_crash', function(data) {
  96. lastCrash = data.game_crash;
  97.  
  98. if (!currentGameData || !currentGameData.hasOwnProperty(engine.getUsername())) {
  99. return;
  100. };
  101.  
  102. lostLast = engine.lastGamePlay() == 'LOST';
  103.  
  104. /********************/
  105.  
  106. if(!lostLast) {
  107. bet = baseBet;
  108. pauseLossStreak = 0;
  109. } else {
  110. pauseLossStreak++;
  111. bet = bet * multiplier;
  112. }
  113.  
  114. /********************/
  115.  
  116. });
Advertisement
Add Comment
Please, Sign In to add comment