Nando0508

Spiocha Pause

Nov 9th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.82 KB | None | 0 0
  1. // Bustabit BlackShadow Cooldown Bot with Spiocha Pause
  2. // By: BlackShadow & MartinG
  3. // Version 2
  4.  
  5. /******************/
  6.  
  7.  
  8. // Settings
  9. var baseBet = 500; // In bits
  10. var baseMultiplier = 1.05; // Target multiplier: 1.13 recommended
  11. var variableBase = false; // Enable variable mode (very experimental), read streakSecurity.
  12. var streakSecurity = 10; // Number of loss-streak you wanna be safe for. Increasing this massively reduces the variableBase calculated. (1-loss = 20%, 2-loss = 5%, 3-loss = 1.25% of your maximum balance). Recommended: 2+
  13. var maximumBet = 999999; // Maximum bet the bot will do (in bits).
  14.  
  15. // Pause settings
  16. var pauseThreshold = 11; // when game crashes above this, betting pauses
  17. var continueThreshold = 2; // when paused and the game crashes above this, betting resumes
  18.  
  19. var pauseAfterNLosses = 5;
  20. var pauseForMGames = 2;
  21.  
  22. /******************/
  23.  
  24. pauseThreshold = Math.round(pauseThreshold * 100);
  25. continueThreshold = Math.round(continueThreshold * 100);
  26.  
  27. // Variables - Do not touch!
  28. var baseSatoshi = baseBet * 100; // Calculated
  29. var currentBet = baseSatoshi;
  30. var currentMultiplier = baseMultiplier;
  31. var currentGameID = -1;
  32. var firstGame = true;
  33. var lossStreak = 0;
  34. var coolingDown = false;
  35.  
  36. var lostLast = false;
  37.  
  38. // Pause Variables
  39. var currentGameData;
  40. var lastCrash = (continueThreshold + pauseThreshold)/2;
  41. var paused = false;
  42. var pauseLossStreak = 0;
  43. var pausedFor = 0;
  44.  
  45.  
  46. // Initialization
  47. console.log('====== Procon\'s BustaBit Bot with Pause ======');
  48. console.log('My username is: ' + engine.getUsername());
  49. console.log('Starting balance: ' + (engine.getBalance() / 100).toFixed(2) + ' bits');
  50. var startingBalance = engine.getBalance();
  51.  
  52. if (variableBase) {
  53. console.warn('[WARN] Variable mode is enabled and not fully tested. Bot is resillient to ' + streakSecurity + '-loss streaks.');
  54. }
  55.  
  56. // On a game starting, place the bet.
  57. engine.on('game_starting', function(info) {
  58.  
  59. console.log('====== New Game ======');
  60.  
  61. /********************/
  62.  
  63. if(lastCrash >= pauseThreshold) {
  64. paused = true;
  65. console.log("Pausing Betting");
  66. return;
  67. }
  68.  
  69. if(paused) {
  70. if(lastCrash >= continueThreshold) {
  71. console.log("Continuing Betting");
  72. lastCrash = (continueThreshold + pauseThreshold)/2;
  73. paused = false;
  74. } else {
  75. console.log("Betting Is Paused");
  76. return;
  77. }
  78. }
  79.  
  80. /********************/
  81.  
  82. if(pausedFor > 0) {
  83. pausedFor++;
  84. if(pausedFor <= pauseForMGames) {
  85. console.log("Paused " + pausedFor + " of " + pauseForMGames + " games");
  86. return;
  87. } else {
  88. console.log("Resuming");
  89. pausedFor = 0;
  90. pauseLossStreak = 0;
  91. }
  92. }
  93.  
  94. if(pauseLossStreak >= pauseAfterNLosses) {
  95. console.log("Pausing for 1 of " + pauseForMGames + " games");
  96. pausedFor = 1;
  97. return;
  98. }
Add Comment
Please, Sign In to add comment