forked from Aiscargeauh/BustabitScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBouncy3xEnhanced.js
More file actions
74 lines (69 loc) · 2.5 KB
/
Bouncy3xEnhanced.js
File metadata and controls
74 lines (69 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
var config = {
noopExample: { type: 'noop', label: 'Base Bet' },
baseBet: { value: 1500, type: 'balance', label: 'Base bet' },
redStreak: { value: 5, type: 'number', label: 'Games under 3 to wait' },
maxBet: { value: 10000, type: 'balance', label: 'Max bet before restarting' }
}
var currentBet = config.baseBet.value;
var redStreakToWait = config.redStreak.value;
//RED STREAK IS UNDER 3 IN THIS SCRIPT
var currentRedStreak = 0;
var bettedGames = 0;
var isBettingNow = false;
var numberOf3xCashedOut = 0;
var startingBalance = userInfo.balance;
var userProfit = 0;
var currentStreakBets = [];
log('FIRST LAUNCH | WELCOME!');
engine.on('GAME_STARTING', function () {
log('');
log('NEW GAME');
log('Profit since starting the script: ' + (userInfo.balance - startingBalance) / 100 + ' bits. Got ' + numberOf3xCashedOut + ' times 3x.');
//If the red streak it attained, or we already started betting
//go bet until we reach gamesToBetAfterRedStreak
if (currentRedStreak >= redStreakToWait || bettedGames != 0) {
engine.bet(currentBet, 3);
bettedGames++;
currentRedStreak = 0;
currentStreakBets.push(currentBet);
log("Betting " + currentBet / 100 + " bits this game.");
isBettingNow = true;
} else {
log("Waiting for streak of " + redStreakToWait + " games under 3x.");
log("Current streak: " + currentRedStreak + ".");
isBettingNow = false;
}
});
engine.on('GAME_ENDED', function () {
let gameInfos = engine.history.first();
if (isBettingNow) {
if (!gameInfos.cashedAt) {
//Lost
log('Lost...');
if (currentStreakBets.length > 1) {
let tempBetAmount = currentStreakBets[currentStreakBets.length - 1] + currentStreakBets[currentStreakBets.length - 2];
if(tempBetAmount > (config.maxBet.value)){
log("Resetting bets! Starting over...");
currentStreakBets = [];
currentBet = config.baseBet.value;
}else{
currentBet = tempBetAmount;
}
}
} else {
//Won
log('Won!');
currentStreakBets = [];
currentBet = config.baseBet.value;
numberOf3xCashedOut++;
bettedGames = 0;
}
}
//RED STREAK IS UNDER 3 FOR THIS SCRIPT
if (gameInfos.bust < 3) {
currentRedStreak++;
} else {
currentRedStreak = 0;
}
log('END GAME');
});