Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Settings
- var targetMultiplier = 3.84; //recomended 1.17
- var initialBet = 100; //in bits
- var maxBet = 100000000; //max Bet in Bits
- var resetBet = false; //true: if max bet is reached bet will be reset to initial bet, false: continue with maxBet
- var stopMaxBet = false; //true: stop if maxBet is reached, false: continue with processing
- var stopLowBalance = true; //true: stop if balance is not enough for currentBet, false: continue with intial bet if possible
- var targetProfit = 100; //in bits; don't be too greedy
- var enableLossStreakProtection = false; // enable LossStreak Protection
- var maxLossStreak = 3; //if Loss Streak Protection is enabled; maximum lose streak before pausing the bot for x games
- var multiplyBet = false; // if set to true each winning stake is multiplied by betMultiplier
- var betMultiplier = 2; //only used when multilyBet is true
- //variables --- DO NOT CHANGE SOMETHING BELOW! -----
- var SatoshiMultiplier = 100;
- var cooledDown = false;
- var baseSatoshi = initialBet * SatoshiMultiplier;
- var maxBetSatoshi = maxBet * SatoshiMultiplier;
- var currLoss = 0;
- var currentGameID = -1;
- var playedGames = 0;
- var profit = 0;
- var initialBalance = engine.getBalance();
- var currentBet = 0;
- var startTime = new Date().getTime();
- var timeRunning = 0;
- var currentTime;
- var highestBalance = 0;
- //Initialization
- console.log('[Bot] ====== Peacem4ker\'s BustaBit Script ======[Bot]');
- console.log('[Bot] My username is: ' + engine.getUsername());
- console.log('[Bot] My starting balance: ' + (engine.getBalance() / SatoshiMultiplier).toFixed(2) + ' bits');
- currentBet = baseSatoshi;
- highestBalance = engine.getBalance();
- //When game starts we place our bet
- engine.on('game_starting', function(info) {
- //if we already have played a game state our Profit
- if ( profit > (targetProfit) ) {
- console.log('[Bot] Target Profit reached: ' + profit );
- engine.stop();
- }
- //We don't have any funds left, therefore it makes no sense to bet... engine will be stopped
- if (engine.getBalance() < SatoshiMultiplier) {
- console.error('[Bot] Insufficent funds to do anything... stopping');
- engine.stop();
- }
- //increase Loss Streak if enabled
- if (enableLossStreakProtection) {
- if (engine.lastGamePlay() == 'LOST' && playedGames > 0){
- currLoss++;
- }
- }
- //is Bot currently cooled down due to a loss streak?
- if (enableLossStreakProtection) {
- if (currLoss >= maxLossStreak){
- cooledDown = true;
- console.log('[Bot] We are on a Loss Streak... Cooling down..');
- }
- if (cooledDown){
- if (currLoss == 0) {
- cooledDown = false;
- }else {
- currLoss--;
- console.log('[Bot] Secured your stake for another ' + currLoss + ' games');
- return;
- }
- }
- }
- //calculate the new bet
- if ( !(engine.lastGamePlay() == 'LOST') && playedGames > 0 )
- {
- currLoss = 0;
- //either multiply or add the basebet
- if (multiplyBet){
- currentBet *= betMultiplier;
- } else{
- currentBet += baseSatoshi;
- }
- if (highestBalance <= engine.getBalance() )
- {
- //use base bet according to OScars Grind systemLanguage
- currentBet = baseSatoshi;
- highestBalance = engine.getBalance();
- }
- }
- //check if maxumum betting amount is reached
- if (currentBet > maxBetSatoshi) {
- console.log('[Bot] Max amount bet bits reached...');
- if (stopMaxBet){
- console.log('[Bot] stopping Bot');
- engine.stop();
- }
- if (resetBet)
- {
- currentBet = baseSatoshi;
- } else {
- currentBet = maxBetSatoshi;
- }
- }
- //check if currentBet is affordable
- if (currentBet > engine.getBalance() )
- {
- console.log('[Bot] Cannot afford ' + currentBet / SatoshiMultiplier + ' bits...');
- if (stopLowBalance){
- console.log('[Bot] Stop betting due to low balance');
- engine.stop();
- }
- if ( baseSatoshi > engine.getBalance() ) {
- console.error('[Bot] Insufficent funds for intial bet... stopping');
- engine.stop();
- }
- currentBet = baseSatoshi;
- }
- //Place our bet
- engine.placeBet(currentBet, Math.round(targetMultiplier * 100), false);
- playedGames++;
- });
- engine.on('game_crash', function(data) {
- if (playedGames > 0)
- {
- currentTime = new Date().getTime();
- timeRunning = currentTime - startTime;
- console.log('[Bot] Script running: ' + (timeRunning / 60000).toFixed(0) + ' minutes');
- profit = (engine.getBalance() - initialBalance) / SatoshiMultiplier;
- console.log('[Bot] Our Current Profit in bits: ' + profit );
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment