Advertisement
Guest User

Untitled

a guest
Jul 20th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. // Settings
  2. var baseBet = 10; // In bits
  3. var baseMultiplier = 1.1; // Target multiplier: 1.10 recommended
  4. var variableBase = false; // Enable variable mode (very experimental), read streakSecurity.
  5. var streakSecurity = 15; // 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+
  6. var maximumBet = 999999; // Maximum bet the bot will do (in bits).
  7.  
  8. // Variables - Do not touch!
  9. var baseSatoshi = baseBet * 100; // Calculated
  10. var currentBet = baseSatoshi;
  11. var currentMultiplier = baseMultiplier;
  12. var currentGameID = -1;
  13. var firstGame = true;
  14. var lossStreak = 0;
  15. var coolingDown = false;
  16.  
  17. // Initialization
  18. console.log('====== Procon\'s BustaBit Bot ======');
  19. console.log('My username is: ' + engine.getUsername());
  20. console.log('Starting balance: ' + (engine.getBalance() / 100).toFixed(2) + ' bits');
  21. var startingBalance = engine.getBalance();
  22.  
  23. if (variableBase) {
  24. console.warn('[WARN] Variable mode is enabled and not fully tested. Bot is resillient to ' + streakSecurity + '-loss streaks.');
  25. }
  26.  
  27. // On a game starting, place the bet.
  28. engine.on('game_starting', function(info) {
  29. console.log('====== New Game ======');
  30. console.log('[Bot] Game #' + info.game_id);
  31. currentGameID = info.game_id;
  32.  
  33. if (coolingDown) {
  34. if (lossStreak == 0) {
  35. coolingDown = false;
  36. }
  37. else {
  38. lossStreak--;
  39. console.log('[Bot] Cooling down! Games remaining: ' + lossStreak);
  40. return;
  41. }
  42. }
  43.  
  44. if (!firstGame) { // Display data only after first game played.
  45. console.log('[Stats] Session profit: ' + ((engine.getBalance() - startingBalance) / 100).toFixed(2) + ' bits');
  46. console.log('[Stats] Profit percentage: ' + (((engine.getBalance() / startingBalance) - 1) * 100).toFixed(2) + '%');
  47. }
  48.  
  49. if (engine.lastGamePlay() == 'LOST' && !firstGame) { // If last game loss:
  50. lossStreak++;
  51. var totalLosses = 0; // Total satoshi lost.
  52. var lastLoss = currentBet; // Store our last bet.
  53. while (lastLoss >= baseSatoshi) { // Until we get down to base bet, add the previous losses.
  54. totalLosses += lastLoss;
  55. lastLoss /= 4;
  56. }
  57.  
  58. if (lossStreak > streakSecurity) { // If we're on a loss streak, wait a few games!
  59. coolingDown = true;
  60. return;
  61. }
  62.  
  63. currentBet *= 7; // Then multiply base bet by 4!
  64. currentMultiplier = 1.00 + (total
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement