Advertisement
curly4

Bustabit Scripts

Dec 16th, 2021
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Bustabit Secret Sauce v12
  2. // By: BlackMartinG
  3. // Version 12
  4.  
  5. /******************/
  6.  
  7.  
  8. // Settings
  9. var baseBet = 25000; // In satoshi
  10. var baseMultiplier = 3.05; // Target multiplier: 4.13 recommended
  11. var variableBase = true; // Enable variable mode (very experimental), read streakSecurity.
  12. var streakSecurity = 1; // 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 = 9; // when game crashes above this, betting pauses
  17. var continueThreshold = 3; // when paused and the game crashes above this, betting resumes
  18.  
  19. var pauseAfterNLosses = 3; // This is the loss run it is set on 3 but you can change it
  20. var pauseForMGames = 1000000; // This is how many games the script is paused for you can change this from 1 upwards
  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. }
  99.  
  100. /********************/
  101.  
  102.  
  103. console.log('[Bot] Game #' + info.game_id);
  104. currentGameID = info.game_id;
  105.  
  106. if (coolingDown) {
  107. if (lossStreak == 0) {
  108. coolingDown = false;
  109. }
  110. else {
  111. lossStreak--;
  112. console.log('[Bot] Cooling down! Games remaining: ' + lossStreak);
  113. return;
  114. }
  115. }
  116.  
  117. if (!firstGame) { // Display data only after first game played.
  118. console.log('[Stats] Session profit: ' + ((engine.getBalance() - startingBalance) / 100).toFixed(2) + ' bits');
  119. console.log('[Stats] Profit percentage: ' + (((engine.getBalance() / startingBalance) - 1) * 100).toFixed(2) + '%');
  120. }
  121.  
  122. if (lostLast && !firstGame) {//if (engine.lastGamePlay() == 'LOST' && !firstGame) { // If last game loss:
  123. lossStreak++;
  124. var totalLosses = 0; // Total satoshi lost.
  125. var lastLoss = currentBet; // Store our last bet.
  126. while (lastLoss >= baseSatoshi) { // Until we get down to base bet, add the previous losses.
  127. totalLosses += lastLoss;
  128. lastLoss /= 2;
  129. }
  130.  
  131. if (lossStreak > streakSecurity) { // If we're on a loss streak, wait a few games!
  132. coolingDown = true;
  133. return;
  134. }
  135.  
  136. currentBet *= 2; // Then multiply base bet by 2!
  137. currentMultiplier = 1 + (totalLosses / currentBet);
  138. }
  139. else { // Otherwise if win or first game:
  140. lossStreak = 0; // If it was a win, we reset the lossStreak.
  141. if (variableBase) { // If variable bet enabled.
  142. // Variable mode resists (currently) 1 loss, by making sure you have enough to cover the base and the 2x base bet.
  143. var divider = 100;
  144. for (i = 0; i < streakSecurity; i++) {
  145. divider += (100 * Math.pow(2, (i + 1)));
  146. }
  147.  
  148. newBaseBet = Math.min(Math.max(1, Math.floor(engine.getBalance() / divider)), maximumBet * 100); // In bits
  149. newBaseSatoshi = newBaseBet * 100;
  150.  
  151. if ((newBaseBet != baseBet) || (newBaseBet == 1)) {
  152. console.log('[Bot] Variable mode has changed base bet to: ' + newBaseBet + ' bits');
  153. baseBet = newBaseBet;
  154. baseSatoshi = newBaseSatoshi;
  155. }
  156. }
  157. // Update bet.
  158. currentBet = baseSatoshi; // in Satoshi
  159. currentMultiplier = baseMultiplier;
  160. }
  161.  
  162. // Message and set first game to false to be sure.
  163. console.log('[Bot] Betting ' + (currentBet / 100) + ' bits, cashing out at ' + currentMultiplier + 'x');
  164. firstGame = false;
  165.  
  166. if (currentBet <= engine.getBalance()) { // Ensure we have enough to bet
  167. if (currentBet > (maximumBet * 100)) { // Ensure you only bet the maximum.
  168. console.warn('[Warn] Bet size exceeds maximum bet, lowering bet to ' + (maximumBet * 100) + ' bits');
  169. currentBet = maximumBet;
  170. }
  171. engine.placeBet(currentBet, Math.round(currentMultiplier * 100), false);
  172. }
  173. else { // Otherwise insufficent funds...
  174. if (engine.getBalance() < 100) {
  175. console.error('[Bot] Insufficent funds to do anything... stopping');
  176. engine.stop();
  177. }
  178. else {
  179. console.warn('[Bot] Insufficent funds to bet ' + (currentBet / 100) + ' bits.');
  180. console.warn('[Bot] Resetting to 1 bit basebet');
  181. baseBet = 1;
  182. baseSatoshi = 100;
  183. }
  184. }
  185. });
  186.  
  187. engine.on('game_started', function(data) {
  188. if (!firstGame) { console.log('[Bot] Game #' + currentGameID + ' has started!'); }
  189. currentGameData = data;
  190. });
  191.  
  192. engine.on('cashed_out', function(data) {
  193. if (data.username == engine.getUsername()) {
  194. console.log('[Bot] Successfully cashed out at ' + (data.stopped_at / 100) + 'x');
  195. }
  196. });
  197.  
  198. engine.on('game_crash', function(data) {
  199. if (!firstGame) { console.log('[Bot] Game crashed at ' + (data.game_crash / 100) + 'x'); }
  200.  
  201. /********************/
  202.  
  203. lastCrash = data.game_crash;
  204.  
  205. if (!currentGameData || !currentGameData.hasOwnProperty(engine.getUsername())) {
  206. return;
  207. };
  208.  
  209. lostLast = engine.lastGamePlay() == 'LOST';
  210.  
  211. console.log((lostLast ? "Lost" : "Won") + " this game.");
  212.  
  213.  
  214. /********************/
  215.  
  216. if(!lostLast) {
  217. pauseLossStreak = 0;
  218. } else {
  219. pauseLossStreak++;
  220. }
  221.  
  222. /********************/
  223. });
  224. RAW Paste Data
  225.  
  226. // Bustabit BlackShadow Cooldown Bot with Spiocha Pause
  227. // By: BlackShadow & MartinG
  228. // Version 5
  229.  
  230. /******************/
  231.  
  232.  
  233. // Settings
  234. var baseBet = 250; // In bits
  235. var baseMultiplier = 1.05; // Target multiplier: 1.13 recommended
  236. var variableBase = false; // Enable variable mode (very experimental), read streakSecurity.
  237. 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+
  238. var maximumBet = 999999; // Maximum bet the bot will do (in bits).
  239.  
  240. // Pause settings
  241. var pauseThreshold = 9; // when game crashes above this, betting pauses
  242. var continueThreshold = 3; // when paused and the game crashes above this, betting resumes
  243.  
  244. var pauseAfterNLosses = 3; // This is the loss run it is set on 3 but you can change it
  245. var pauseForMGames = 1000000; // This is how many games the script is paused for you can change this from 1 upwards
  246.  
  247. /******************/
  248.  
  249. pauseThreshold = Math.round(pauseThreshold * 100);
  250. continueThreshold = Math.round(continueThreshold * 100);
  251.  
  252. // Variables - Do not touch!
  253. var baseSatoshi = baseBet * 100; // Calculated
  254. var currentBet = baseSatoshi;
  255. var currentMultiplier = baseMultiplier;
  256. var currentGameID = -1;
  257. var firstGame = true;
  258. var lossStreak = 0;
  259. var coolingDown = false;
  260.  
  261. var lostLast = false;
  262.  
  263. // Pause Variables
  264. var currentGameData;
  265. var lastCrash = (continueThreshold + pauseThreshold)/2;
  266. var paused = false;
  267. var pauseLossStreak = 0;
  268. var pausedFor = 0;
  269.  
  270.  
  271. // Initialization
  272. console.log('====== Procon\'s BustaBit Bot with Pause ======');
  273. console.log('My username is: ' + engine.getUsername());
  274. console.log('Starting balance: ' + (engine.getBalance() / 100).toFixed(2) + ' bits');
  275. var startingBalance = engine.getBalance();
  276.  
  277. if (variableBase) {
  278. console.warn('[WARN] Variable mode is enabled and not fully tested. Bot is resillient to ' + streakSecurity + '-loss streaks.');
  279. }
  280.  
  281. // On a game starting, place the bet.
  282. engine.on('game_starting', function(info) {
  283.  
  284. console.log('====== New Game ======');
  285.  
  286. /********************/
  287.  
  288. if(lastCrash >= pauseThreshold) {
  289. paused = true;
  290. console.log("Pausing Betting");
  291. return;
  292. }
  293.  
  294. if(paused) {
  295. if(lastCrash >= continueThreshold) {
  296. console.log("Continuing Betting");
  297. lastCrash = (continueThreshold + pauseThreshold)/2;
  298. paused = false;
  299. } else {
  300. console.log("Betting Is Paused");
  301. return;
  302. }
  303. }
  304.  
  305. /********************/
  306.  
  307. if(pausedFor > 0) {
  308. pausedFor++;
  309. if(pausedFor <= pauseForMGames) {
  310. console.log("Paused " + pausedFor + " of " + pauseForMGames + " games");
  311. return;
  312. } else {
  313. console.log("Resuming");
  314. pausedFor = 0;
  315. pauseLossStreak = 0;
  316. }
  317. }
  318.  
  319. if(pauseLossStreak >= pauseAfterNLosses) {
  320. console.log("Pausing for 1 of " + pauseForMGames + " games");
  321. pausedFor = 1;
  322. return;
  323. }
  324.  
  325. /********************/
  326.  
  327.  
  328. console.log('[Bot] Game #' + info.game_id);
  329. currentGameID = info.game_id;
  330.  
  331. if (coolingDown) {
  332. if (lossStreak == 0) {
  333. coolingDown = false;
  334. }
  335. else {
  336. lossStreak--;
  337. console.log('[Bot] Cooling down! Games remaining: ' + lossStreak);
  338. return;
  339. }
  340. }
  341.  
  342. if (!firstGame) { // Display data only after first game played.
  343. console.log('[Stats] Session profit: ' + ((engine.getBalance() - startingBalance) / 100).toFixed(2) + ' bits');
  344. console.log('[Stats] Profit percentage: ' + (((engine.getBalance() / startingBalance) - 1) * 100).toFixed(2) + '%');
  345. }
  346.  
  347. if (lostLast && !firstGame) {//if (engine.lastGamePlay() == 'LOST' && !firstGame) { // If last game loss:
  348. lossStreak++;
  349. var totalLosses = 0; // Total satoshi lost.
  350. var lastLoss = currentBet; // Store our last bet.
  351. while (lastLoss >= baseSatoshi) { // Until we get down to base bet, add the previous losses.
  352. totalLosses += lastLoss;
  353. lastLoss /= 2;
  354. }
  355.  
  356. if (lossStreak > streakSecurity) { // If we're on a loss streak, wait a few games!
  357. coolingDown = true;
  358. return;
  359. }
  360.  
  361. currentBet *= 2; // Then multiply base bet by 2!
  362. currentMultiplier = 1 + (totalLosses / currentBet);
  363. }
  364. else { // Otherwise if win or first game:
  365. lossStreak = 0; // If it was a win, we reset the lossStreak.
  366. if (variableBase) { // If variable bet enabled.
  367. // Variable mode resists (currently) 1 loss, by making sure you have enough to cover the base and the 2x base bet.
  368. var divider = 100;
  369. for (i = 0; i < streakSecurity; i++) {
  370. divider += (100 * Math.pow(2, (i + 1)));
  371. }
  372.  
  373. newBaseBet = Math.min(Math.max(1, Math.floor(engine.getBalance() / divider)), maximumBet * 100); // In bits
  374. newBaseSatoshi = newBaseBet * 100;
  375.  
  376. if ((newBaseBet != baseBet) || (newBaseBet == 1)) {
  377. console.log('[Bot] Variable mode has changed base bet to: ' + newBaseBet + ' bits');
  378. baseBet = newBaseBet;
  379. baseSatoshi = newBaseSatoshi;
  380. }
  381. }
  382. // Update bet.
  383. currentBet = baseSatoshi; // in Satoshi
  384. currentMultiplier = baseMultiplier;
  385. }
  386.  
  387. // Message and set first game to false to be sure.
  388. console.log('[Bot] Betting ' + (currentBet / 100) + ' bits, cashing out at ' + currentMultiplier + 'x');
  389. firstGame = false;
  390.  
  391. if (currentBet <= engine.getBalance()) { // Ensure we have enough to bet
  392. if (currentBet > (maximumBet * 100)) { // Ensure you only bet the maximum.
  393. console.warn('[Warn] Bet size exceeds maximum bet, lowering bet to ' + (maximumBet * 100) + ' bits');
  394. currentBet = maximumBet;
  395. }
  396. engine.placeBet(currentBet, Math.round(currentMultiplier * 100), false);
  397. }
  398. else { // Otherwise insufficent funds...
  399. if (engine.getBalance() < 100) {
  400. console.error('[Bot] Insufficent funds to do anything... stopping');
  401. engine.stop();
  402. }
  403. else {
  404. console.warn('[Bot] Insufficent funds to bet ' + (currentBet / 100) + ' bits.');
  405. console.warn('[Bot] Resetting to 1 bit basebet');
  406. baseBet = 1;
  407. baseSatoshi = 100;
  408. }
  409. }
  410. });
  411.  
  412. engine.on('game_started', function(data) {
  413. if (!firstGame) { console.log('[Bot] Game #' + currentGameID + ' has started!'); }
  414. currentGameData = data;
  415. });
  416.  
  417. engine.on('cashed_out', function(data) {
  418. if (data.username == engine.getUsername()) {
  419. console.log('[Bot] Successfully cashed out at ' + (data.stopped_at / 100) + 'x');
  420. }
  421. });
  422.  
  423. engine.on('game_crash', function(data) {
  424. if (!firstGame) { console.log('[Bot] Game crashed at ' + (data.game_crash / 100) + 'x'); }
  425.  
  426. /********************/
  427.  
  428. lastCrash = data.game_crash;
  429.  
  430. if (!currentGameData || !currentGameData.hasOwnProperty(engine.getUsername())) {
  431. return;
  432. };
  433.  
  434. lostLast = engine.lastGamePlay() == 'LOST';
  435.  
  436. console.log((lostLast ? "Lost" : "Won") + " this game.");
  437.  
  438.  
  439. /********************/
  440.  
  441. if(!lostLast) {
  442. pauseLossStreak = 0;
  443. } else {
  444. pauseLossStreak++;
  445. }
  446.  
  447. /********************/
  448. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement