This repository has been archived by the owner on Nov 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
10xChasing.js
130 lines (120 loc) · 4.33 KB
/
10xChasing.js
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
var config = {
baseBet: { value: 3200, type: 'balance', label: 'Base bet'},
gamesToWait: { value: 25, type: 'text', label: 'Games to wait before making a bet'}
}
//10x chasing script by @Cannonball
//Feel free to tip, as is it a free script
//Also feel free to ping me if you got questions
//Will wait for the number of game you set before beginning the chase
//->Will bet 9 games at the base bet you set
//-->Will double the bet after 9 lost games
//--->Will double the bet after 6 lost games (15 total)
//---->Will double the bet every 5 games then (20, 25, 30...) until 10x
//Has a history feature, will check the current number of games since 10x at the beginning of script
//Has a simulation feature, will calculate how many games without 10x you can handle without busting your bankroll
//Has logging functionalities, press F12
var gamesWithout10 = GetGamesWithout10();
var numberOf10xCashedOut = 0;
var userProfitInSatoshis = 0;
var currentBetInSatoshis = config.baseBet.value;
var isBettingNow = false;
var loosingStreak = 0;
var gamesToBeSafy = 130;
var biggestBet = 0;
var gamesTheBotCanHandle = CalculateBotSafeness(config.baseBet.value, config.gamesToWait.value);
log('FIRST LAUNCH | WELCOME!');
log('Bot safety check :');
log('-> You can manage to loose ' + gamesTheBotCanHandle + ' games without 10x before busting to zero');
log('-> With the maximum bet: ' + biggestBet / 100 + 'bits.');
log('-> We do assume 130 games is the maximum streak without 10x so...');
if(gamesTheBotCanHandle >= gamesToBeSafy){
log('--> It looks safe with your parameters, let\'s go!');
}else{
log('--> Please stay around, it\'s not really safe with your parameters, chances to bust are quite high...');
}
engine.on('GAME_STARTING', function() {
log('');
log('NEW GAME')
log('Games since no 10x: ' + gamesWithout10 + '. You can handle: ' + gamesTheBotCanHandle + ' games without 10x.');
log('Actual profit using the script: ' + userProfitInSatoshis /100 + ' bits. Got ' + numberOf10xCashedOut + ' times 10x.');
if(gamesWithout10 > config.gamesToWait.value){
//do place bet
engine.bet(currentBetInSatoshis, 10);
let currentBetInBits = currentBetInSatoshis / 100;
let wantedProfit = (currentBetInBits * 9) + (userProfitInSatoshis / 100);
log('Betting ' + currentBetInBits + ' right now, looking for ' + wantedProfit + ' bits total profit.')
isBettingNow = true;
}else{
isBettingNow = false;
let calculatedGamesToWait = config.gamesToWait.value - gamesWithout10;
if(calculatedGamesToWait == 0){
log('Betting ' + config.baseBet.value/100 + 'bit(s) next game!');
}else{
log('Waiting for ' + calculatedGamesToWait + ' more games with no 10x');
}
}
})
engine.on('GAME_ENDED', function() {
let gameInfos = engine.history.first();
if(isBettingNow){
if(!gameInfos.cashedAt){
userProfitInSatoshis -= currentBetInSatoshis;
loosingStreak++;
if(loosingStreak == 9){
currentBetInSatoshis *= 2;
}
if(loosingStreak > 10 && (loosingStreak + 1) % 5 == 0){
currentBetInSatoshis *= 2;
}
}else if(gameInfos.cashedAt){
numberOf10xCashedOut++;
loosingStreak = 0;
userProfitInSatoshis = userProfitInSatoshis + (currentBetInSatoshis * 9);
currentBetInSatoshis = config.baseBet.value;
}
}
if(gameInfos.bust > 10){
gamesWithout10 = 0;
}else{
gamesWithout10++;
}
log('END GAME');
})
function CalculateBotSafeness(baseBetForBot, gamesToWaitForBot){
//22:06 Cannonball: !streak < 10
//22:06 Shiba: Seen 122 streak in games #1801655 - #1801776: 1.25x, 2.13x, 3.25x, 5.57x, 1.62x, 5.45x, 1.43x, 8.75x... (59,226 games ago, 15d 9h 10m 43s ago)
//Let's assume if we can handle 130 games, we're safe
//And let's simulate
let totalGames = gamesToWaitForBot;
let brInSatoshis = userInfo.balance;
let bettedGames = 0;
let nextBet = baseBetForBot;
let broken = false;
while(!broken){
brInSatoshis -= nextBet;
totalGames++;
bettedGames++;
if (bettedGames % 9 == 0 && bettedGames < 10)
{
nextBet *= 2;
}else if((bettedGames + 1) % 5 == 0 && bettedGames > 10){
nextBet *= 2;
}
if(nextBet > brInSatoshis){
biggestBet = nextBet;
broken = true;
}
}
return totalGames;
}
function GetGamesWithout10(){
let gamesArray = engine.history.toArray();
let generatedGamesWithout10 = 0;
for (var i = 0; i < gamesArray.length; i++) {
if(gamesArray[i].bust >= 10){
break;
}
generatedGamesWithout10++;
}
return generatedGamesWithout10;
}