Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Settings
- var usePercentageBalance = true;
- var percentageBalance = 0.01;
- var baseBet = 1; // In bits
- var maximumBet = 10000; // Maximum bet the bot will do (in bits).
- // Variables - Do not touch!
- var baseSatoshi = baseBet * 100; // Calculated
- var currentBet = baseSatoshi;
- var currentGameID = -1;
- var currentMult = 4;
- var firstGame = true;
- var lastStreak = true;
- var startBalance;
- var lastStreakBet = baseSatoshi;
- var dateStart = Date.now()
- // Initialization
- console.log('====== Pacha\'s BustaBit Bot, made for Lautaro "mi pene de excursion en un jardin de infantes" Perea ======');
- console.log('User: ' + engine.getUsername());
- console.log('Balance: ' + (engine.getBalance() / 100).toFixed(2) + ' bits');
- var startingBalance = engine.getBalance();
- // On a game starting, place the bet.
- engine.on('game_starting', function(info) {
- console.log('====== New Game ======');
- console.log('[Bot] Game #' + info.game_id);
- currentGameID = info.game_id;
- if (!firstGame) {
- console.log('[Stats] Session profit: ' + ((engine.getBalance() - startingBalance) / 100).toFixed(2) + ' bits');
- console.log('[Stats] Profit percentage: ' + (((engine.getBalance() / startingBalance) - 1) * 100).toFixed(2) + '%');
- }
- else
- {
- startBalance = engine.getBalance()
- }
- var beforeLastStreak = lastStreak;
- if (engine.lastGamePlay() == 'LOST') {
- lastStreak = false;
- currentMult--;
- }
- else {
- lastStreak = true;
- currentMult++;
- }
- var multiplier = 1.1;
- multiplier += currentMult / 10.0
- currentBet = Math.round(engine.getBalance() * percentageBalance)
- if (!usePercentageBalance)
- {
- currentBet = baseSatoshi
- }
- currentBet -= currentBet % 100
- if (currentBet < 100) currentBet = 100;
- // Message and set first game to false to be sure.
- console.log('[Bot] Betting ' + (currentBet / 100) + ' bits, cashing out at ' + multiplier + 'x');
- firstGame = false;
- if ((engine.getBalance() - startBalance) > startBalance * 0.02)
- {
- startBalance = engine.getBalance()
- dateStart = Date.now();
- dateStart.setHours(dateStart.getHours() + 1)
- }
- if (currentBet <= engine.getBalance()) { // Ensure we have enough to bet
- if (currentBet > (maximumBet * 100)) { // Ensure you only bet the maximum.
- console.warn('[Warn] Bet size exceeds maximum bet' + maximumBet + ', capping.');//, lowering bet to ' + () + ' bits');
- currentBet = maximumBet * 100;
- }
- if (Date.now() >= dateStart)
- {
- engine.placeBet(currentBet, Math.round(multiplier * 100), false);
- }
- }
- else { // Otherwise insufficent funds...
- if (engine.getBalance() < 100) {
- console.error('[Bot] Insufficent funds to do anything... stopping');
- engine.stop();
- }
- else {
- console.warn('[Bot] Insufficent funds to bet ' + (currentBet / 100) + ' bits. Stopping the bot');
- engine.stop();
- }
- }
- });
- engine.on('game_started', function(data) {
- if (!firstGame) { console.log('[Bot] Game #' + currentGameID + ' has started!'); }
- });
- engine.on('cashed_out', function(data) {
- if (data.username == engine.getUsername()) {
- console.log('[Bot] Successfully cashed out at ' + (data.stopped_at / 100) + 'x');
- }
- });
- engine.on('game_crash', function(data) {
- if (!firstGame) { console.log('[Bot] Game crashed at ' + (data.game_crash / 100) + 'x'); }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement