Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Procon's BustaBit Bot
- *
- * This version includes some (disabled by default) experiments.
- * Enabling 'useCrashAverage' will allow the script to try to determine a trend.
- * It will raise the multiplier accordingly.
- * The bot will take 4 rounds to generate the average, then, adjust it per game afterwards.
- *
- * Like the script? Consider donating me a few bits! :)
- *
- * Disclaimer: All rights are reserved for the original creator of this script.
- */
- // Settings
- var baseBet = 100;
- // In bits
- var baseMultiplier = 1.05;
- // Target multiplier: 1.13 recommended
- var variableBase = false;
- // Enable variable mode (very experimental), read streakSecurity.
- var streakSecurity = 50;
- // 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+
- var maximumBet = 999999;
- // Maximum bet the bot will do (in bits).
- var percentageOfTotal = 100;
- // Percentage of total balance to use when max loss is hit. (100 = 100%)
- var useCrashAverage = false;
- // Enable editing current multiplier based on past 4 crash average. (Experimental!)
- var highAverage = 1.80;
- // Average multiplier to use the highAverageMultiplier.
- var highAverageMultiplier = 1.30;
- // Multiplier to use when crash average is above highAverage.
- var BustaBit = true;
- // Enable when using BustaBit, disable when using CS:GO Crash. (Changed how the script grabs your username)
- // Variables - Do not touch!
- var baseSatoshi = baseBet * 100; // Calculated
- var currentBet = baseSatoshi;
- var currentMultiplier = baseMultiplier;
- var currentGameID = -1;
- var firstGame = true;
- var lossStreak = 0;
- var coolingDown = false;
- var d = new Date();
- var startTime = d.getTime();
- var takingBreak = false;
- var takeBreaks = false; // Broken, disabled
- var lowAverage = 1.45;
- var tempCrash;
- var gameAverage;
- var currentGame = 0;
- var game1;
- var game2;
- var game3;
- var game4;
- // Initialization
- console.log('====== Procon\'s BustaBit Bot ======');
- console.log('====== Re-coded by CurtisVL ======');
- if(BustaBit == true){
- console.log('My username is: ' + engine.getUsername());
- }
- else{
- console.log('My username is: ' + engine.getSteamID());
- }
- console.log('Starting balance: ' + (engine.getBalance() / 100).toFixed(2) + ' bits');
- var startingBalance = engine.getBalance();
- if (variableBase) {
- console.warn('[WARN] Variable mode is enabled and not fully tested. Bot is resillient to ' + streakSecurity + '-loss streaks.');
- }
- // 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(game4 != null && useCrashAverage == true){
- gameAverage = (((game1 + game2) + (game3 + game4)) / 4);
- console.log("[Bot] Average crash: " + gameAverage + "x");
- }
- else{
- gameAverage = 0;
- }
- if (coolingDown) {
- if (lossStreak == 0) {
- coolingDown = false;
- }
- else {
- lossStreak--;
- console.log('[Bot] Cooling down! Games remaining: ' + lossStreak);
- return;
- }
- }
- if(gameAverage <= lowAverage && takeBreaks == true && game4 != null){
- takingBreak = true;
- console.log("Too low average. Taking a break this round!");
- }
- else{
- takingBreak = false;
- }
- if (!firstGame) { // Display data only after first game played.
- console.log('[Stats] Session profit: ' + ((engine.getBalance() - startingBalance) / 100).toFixed(2) + ' bits in '+ Math.round(timeplaying) + ' minutes.');
- console.log('[Stats] Profit percentage: ' + (((engine.getBalance() / startingBalance) - 1) * 100).toFixed(2) + '%');
- }
- if(firstGame == true){
- newdate = new Date();
- timeplaying = ((newdate.getTime() - startTime) / 1000) / 60;
- }
- if (engine.lastGamePlay() == 'LOST' && !firstGame && takingBreak == false) { // If last game loss:
- lossStreak++;
- var totalLosses = 0; // Total satoshi lost.
- var lastLoss = currentBet; // Store our last bet.
- while (lastLoss >= baseSatoshi) { // Until we get down to base bet, add the previous losses.
- totalLosses += lastLoss;
- lastLoss /= 4;
- }
- if (lossStreak > streakSecurity) { // If we're on a loss streak, wait a few games!
- coolingDown = true;
- return;
- }
- currentBet *= 4; // Then multiply base bet by 4!
- currentMultiplier = 1 + (totalLosses / currentBet);
- }
- else { // Otherwise if win or first game:
- lossStreak = 0; // If it was a win, we reset the lossStreak.
- if (variableBase) { // If variable bet enabled.
- // Variable mode resists (currently) 1 loss, by making sure you have enough to cover the base and the 4x base bet.
- var divider = 100;
- for (i = 0; i < streakSecurity; i++) {
- divider += (100 * Math.pow(4, (i + 1)));
- }
- newBaseBet = Math.min(Math.max(1, Math.floor((percentageOfTotal/100) * engine.getBalance() / divider)), maximumBet * 100); // In bits
- newBaseSatoshi = newBaseBet * 100;
- if ((newBaseBet != baseBet) || (newBaseBet == 1)) {
- console.log('[Bot] Variable mode has changed base bet to: ' + newBaseBet + ' bits');
- baseBet = newBaseBet;
- baseSatoshi = newBaseSatoshi;
- }
- }
- currentMultiplier = baseMultiplier;
- if(lossStreak == 0 && useCrashAverage == true && gameAverage != 0){
- if(gameAverage < highAverage){
- currentMultiplier = baseMultiplier;
- }
- if(gameAverage >= highAverage){
- currentMultiplier = highAverageMultiplier;
- }
- }
- // Update bet.
- currentBet = baseSatoshi; // in Satoshi
- }
- // Message and set first game to false to be sure.
- console.log('[Bot] Betting ' + (currentBet / 100) + ' bits, cashing out at ' + currentMultiplier + 'x');
- firstGame = false;
- if (currentBet <= engine.getBalance() && takingBreak == false) { // Ensure we have enough to bet
- if (currentBet > (maximumBet * 100)) { // Ensure you only bet the maximum.
- console.warn('[Warn] Bet size exceeds maximum bet, lowering bet to ' + (maximumBet * 100) + ' bits');
- currentBet = maximumBet;
- }
- engine.placeBet(currentBet, Math.round(currentMultiplier * 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.');
- console.warn('[Bot] Resetting to 1 bit basebet');
- baseBet = 1;
- baseSatoshi = 100;
- }
- }
- });
- //Game Started
- engine.on('game_started', function(data) {
- if (!firstGame) { console.log('[Bot] Game #' + currentGameID + ' has started!'); }
- });
- //Cashed Out
- engine.on('cashed_out', function(data) {
- if(BustaBit == true){
- if (data.username == engine.getUsername()) {
- console.log('[Bot] Successfully cashed out at ' + (data.stopped_at / 100) + 'x');
- }
- }
- });
- //Game Crash
- engine.on('game_crash', function(data) {
- if(BustaBit == false){
- if (data.username == engine.getSteamID()) {
- console.log('[Bot] Successfully cashed out at ' + (data.stopped_at / 100) + 'x');
- }
- }
- if (!firstGame) { console.log('[Bot] Game crashed at ' + (data.game_crash / 100) + 'x'); }
- newdate = new Date();
- timeplaying = ((newdate.getTime() - startTime) / 1000) / 60;
- currentGame++;
- tempCrash = (data.game_crash / 100);
- if (tempCrash >= 2.0){
- tempCrash = 2.0;
- }
- if (currentGame == 1){
- game1 = tempCrash;
- }
- else if(currentGame == 2){
- game2 = tempCrash;
- }
- else if(currentGame == 3){
- game3 = tempCrash;
- }
- else if(currentGame == 4){
- game4 = tempCrash;
- }
- else if(currentGame >= 5){
- currentGame = 1;
- game1 = tempCrash;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement