SHOW:
|
|
- or go back to the newest paste.
| 1 | //[WARNING] Use this script at your own risk, nobody is responsible if you lose money on bustabit when you use this bot. | |
| 2 | ||
| 3 | //Settings | |
| 4 | var GameMode = 4; //Default: 5 1 = Martingale, 2 = Paroli, 3 = D’Alembert, 4 = Pluscoup, 5 = Recovery | |
| 5 | var MaxProfitMode = true; //Default: true If this setting is true, you will always bet ("PercentOfTotal" * your balance), if this setting is false you will just bet your BaseBet.
| |
| 6 | var PercentOfTotal = 0.2; //Default: 0.1 If MaxProfitMode is true, your BaseBet will always be ("PercentOfTotal" * your balance). Default 0.1% of your total balance.
| |
| 7 | var BaseBet = 35; //Default: 100 This is the value of your first bet (in bits) when MaxProfitMode is set to false. | |
| 8 | var Multiplier = 1.5; //Default: 1.05 This is the multiplier where the bot will stop (not on GameMode 2 and 3). | |
| 9 | var dalembert = 1; //Default: 1 When you play D'alembert you will raise your bet after a loss or lower your bet after a win with this amount. | |
| 10 | var MaxBet = 10000; //Default: 1000000 The bot will never bet more than this amount (in bits). | |
| 11 | var MaxProfit = 200000; //Default: 100000 The bot will stop when your total balance is higher that this value (in bits). | |
| 12 | var MaxLoss = 5000; //Default: 25000 You will never lose more than this amount (in bits). If a bet would exceed this amount, the bot stops automatically. | |
| 13 | var RandomBreak = 0; //Default: 0 Before the bot places a bet it generates a random number between 0 and 100, if that number is lower than "RandomBreak" the bot will take a break for 1 game. (This will not happen on a loss streak ) | |
| 14 | ||
| 15 | // Don't change anything below this if you don't know what you are doing! | |
| 16 | var Username = engine.getUsername(); | |
| 17 | var StartBalance = engine.getBalance(); | |
| 18 | var CurrentGameID = -1; | |
| 19 | var FirstGame = true; | |
| 20 | var CurrentBet = BaseBet; | |
| 21 | var CurrentMultiplier = Multiplier; | |
| 22 | var d = new Date(); | |
| 23 | var StartTime = d.getTime(); | |
| 24 | var LastResult = "WON"; | |
| 25 | var Break = false; | |
| 26 | // Check previous bet | |
| 27 | var LastBet = 0; | |
| 28 | var LastProfit = 0; | |
| 29 | var NewProfit = 0; | |
| 30 | // Paroli variable's | |
| 31 | var ParoliRound = 1; | |
| 32 | var ParoliGame = 1; | |
| 33 | var StartBet = BaseBet; | |
| 34 | // Pluscoup variable's | |
| 35 | var Unit = 1; | |
| 36 | var SessionProfit = 0; | |
| 37 | var MaxSessionProfit = Multiplier - 1; | |
| 38 | // Recovery variable's | |
| 39 | var SessionLost = 0; | |
| 40 | ||
| 41 | // Paroli Confirm dialog to set Multiplier to X2.0. | |
| 42 | if(GameMode == 2){
| |
| 43 | if (confirm("[BustaBot] Paroli is currently only available with the multiplier set to X2.0") == true) {
| |
| 44 | // Do nothing and continue with the script. | |
| 45 | console.log('[BustaBot] Multiplier set to X2.0');
| |
| 46 | } else {
| |
| 47 | // Canceled Paroli mode, bot stopped. | |
| 48 | console.log('[BustaBot] Canceled paroli mode on multiplier X2.0');
| |
| 49 | engine.stop(); | |
| 50 | } | |
| 51 | } | |
| 52 | ||
| 53 | // D'alambert Confirm dialog to set Multiplier to X2.0. | |
| 54 | if(GameMode == 3){
| |
| 55 | if (confirm("[BustaBot] D'alambert is currently only available with the multiplier set to X2.0") == true) {
| |
| 56 | // Do nothing and continue with the script. | |
| 57 | console.log('[BustaBot] Multiplier set to X2.0');
| |
| 58 | } else {
| |
| 59 | // Canceled Paroli mode, bot stopped. | |
| 60 | console.log('[BustaBot] Canceled D alambert mode on multiplier X2.0');
| |
| 61 | engine.stop(); | |
| 62 | } | |
| 63 | } | |
| 64 | ||
| 65 | // Welcome message | |
| 66 | console.log('[BustaBot] Welcome ' + Username);
| |
| 67 | console.log('[BustaBot] Your start ballance is: ' + (StartBalance / 100).toFixed(2) + ' bits');
| |
| 68 | ||
| 69 | //check if the multiplier is 1 or higher. | |
| 70 | if(Multiplier < 1){
| |
| 71 | console.log('[BustaBot] Your multiplier must be 1.0 or higher.');
| |
| 72 | engine.stop(); | |
| 73 | } | |
| 74 | ||
| 75 | if(GameMode < 1 || GameMode > 5){
| |
| 76 | console.log('[BustaBot] Select a game mode between 1 and 5.');
| |
| 77 | engine.stop(); | |
| 78 | } | |
| 79 | ||
| 80 | ||
| 81 | // Start of a game. | |
| 82 | engine.on('game_starting', function(info) {
| |
| 83 | CurrentGameID = info.game_id; | |
| 84 | console.log('---------------------');
| |
| 85 | console.log('[BustaBot] Game #' + CurrentGameID + ' started.');
| |
| 86 | ||
| 87 | var random = randomNumber(1,100); | |
| 88 | ||
| 89 | if(random < RandomBreak){
| |
| 90 | console.log("Taking a break this round.");
| |
| 91 | Break = true; | |
| 92 | } | |
| 93 | ||
| 94 | if(Break == false){
| |
| 95 | ||
| 96 | if(MaxProfitMode == true){
| |
| 97 | BaseBet = Math.round((PercentOfTotal / 100) * (engine.getBalance() / 100).toFixed(2)); | |
| 98 | } | |
| 99 | ||
| 100 | if (LastResult == 'LOST' && !FirstGame) { // Check if you lost the last game
| |
| 101 | if(GameMode == 1){// Martingale
| |
| 102 | NewProfit = LastBet + LastProfit; | |
| 103 | CurrentBet = Math.round((NewProfit / LastProfit) * LastBet); | |
| 104 | CurrentMultiplier = Multiplier; | |
| 105 | } | |
| 106 | ||
| 107 | if(GameMode == 2){// Paroli
| |
| 108 | CurrentMultiplier = 2; | |
| 109 | CurrentBet = StartBet; | |
| 110 | console.log('[BustaBot] Paroli Round: ' + ParoliRound + ' Game: ' + ParoliGame);
| |
| 111 | ParoliGame++; | |
| 112 | } | |
| 113 | ||
| 114 | if(GameMode == 3){// D’Alembert
| |
| 115 | CurrentMultiplier = 2; | |
| 116 | CurrentBet = LastBet + dalembert; | |
| 117 | } | |
| 118 | ||
| 119 | if(GameMode == 4){// Pluscoup
| |
| 120 | SessionProfit = SessionProfit - Unit; | |
| 121 | CurrentBet = LastBet; | |
| 122 | CurrentMultiplier = Multiplier; | |
| 123 | } | |
| 124 | ||
| 125 | if(GameMode == 5){// Recovery
| |
| 126 | SessionLost = SessionLost + CurrentBet; | |
| 127 | CurrentBet = LastBet * 2; | |
| 128 | CurrentMultiplier = (SessionLost + CurrentBet) / CurrentBet; | |
| 129 | } | |
| 130 | } | |
| 131 | else { // If won last game or first game
| |
| 132 | ||
| 133 | if(GameMode == 1){// Martingale
| |
| 134 | CurrentBet = BaseBet; | |
| 135 | CurrentMultiplier = Multiplier; | |
| 136 | } | |
| 137 | ||
| 138 | if(GameMode == 2){// Paroli
| |
| 139 | CurrentMultiplier = 2; | |
| 140 | if(ParoliGame == 1){
| |
| 141 | StartBet = BaseBet; | |
| 142 | CurrentBet = StartBet; | |
| 143 | } | |
| 144 | if(ParoliGame == 2){
| |
| 145 | CurrentBet = LastBet * 2; | |
| 146 | } | |
| 147 | if(ParoliGame == 3){
| |
| 148 | CurrentBet = LastBet * 2; | |
| 149 | } | |
| 150 | console.log('[BustaBot] Paroli Round: ' + ParoliRound + ' Game: ' + ParoliGame);
| |
| 151 | ParoliGame++; | |
| 152 | } | |
| 153 | ||
| 154 | if(GameMode == 3){// D'alambert
| |
| 155 | CurrentMultiplier = 2; | |
| 156 | if(!FirstGame) | |
| 157 | {
| |
| 158 | CurrentBet = LastBet - dalembert; | |
| 159 | } | |
| 160 | } | |
| 161 | ||
| 162 | if(GameMode == 4){// Pluscoup
| |
| 163 | CurrentMultiplier = Multiplier; | |
| 164 | if(SessionProfit >= MaxSessionProfit) | |
| 165 | {
| |
| 166 | StartBet = BaseBet; | |
| 167 | SessionProfit = 0; | |
| 168 | Unit = 1; | |
| 169 | } | |
| 170 | else | |
| 171 | {
| |
| 172 | Unit ++; | |
| 173 | while((((Unit * Multiplier) - Unit) + SessionProfit) > MaxSessionProfit){
| |
| 174 | Unit = Unit - 1; | |
| 175 | } | |
| 176 | } | |
| 177 | if(FirstGame){ Unit = 1; StartBet = BaseBet;}
| |
| 178 | if(Unit < 1){
| |
| 179 | Unit = 1; | |
| 180 | StartBet = BaseBet; | |
| 181 | } | |
| 182 | CurrentBet = Unit * StartBet; | |
| 183 | } | |
| 184 | ||
| 185 | if(GameMode == 5){// Recovery
| |
| 186 | SessionLost = 0; | |
| 187 | CurrentBet = BaseBet; | |
| 188 | CurrentMultiplier = Multiplier; | |
| 189 | } | |
| 190 | ||
| 191 | } | |
| 192 | ||
| 193 | //check if current bet is 0 or negative | |
| 194 | if(CurrentBet < 1){
| |
| 195 | CurrentBet = 1; | |
| 196 | } | |
| 197 | ||
| 198 | //Check if a Paroli round is finished and start new round for the next bet. | |
| 199 | if(ParoliGame == 4){
| |
| 200 | ParoliGame = 1; | |
| 201 | ParoliRound++; | |
| 202 | } | |
| 203 | ||
| 204 | // First game is set to false. | |
| 205 | FirstGame = false; | |
| 206 | // Changing last result | |
| 207 | LastResult = "LOST"; | |
| 208 | if(((engine.getBalance() / 100) - CurrentBet) < ((StartBalance / 100) - MaxLoss)){
| |
| 209 | console.log('[BustaBot] This bet would Exceed Your maximum loss, the bot will stop now... ');
| |
| 210 | engine.stop(); | |
| 211 | }else{
| |
| 212 | if (CurrentBet <= engine.getBalance()) { // Check if the balance is high enough to place the bet.
| |
| 213 | if (CurrentBet > (MaxBet)) { // Check if the bet is higher than the given maximum bet by the user.
| |
| 214 | console.warn('[BustaBot] Current bet exceeds your maximum bet. Your bet is changed to: ' + (MaxBet) + ' bits');
| |
| 215 | CurrentBet = MaxBet; | |
| 216 | } | |
| 217 | console.log('[BustaBot] Betting ' + (CurrentBet) + ' bits, cashing out at ' + CurrentMultiplier + 'x');
| |
| 218 | engine.placeBet(CurrentBet * 100, Math.round(CurrentMultiplier * 100), false); | |
| 219 | LastBet = CurrentBet; | |
| 220 | LastProfit = (CurrentBet * CurrentMultiplier) - CurrentBet; | |
| 221 | } | |
| 222 | else { // Not enough balance to place the bet.
| |
| 223 | if (engine.getBalance() < 100) { // Stop the bot if balance is less then 100 bits.
| |
| 224 | console.error('[BustaBot] Your account balance is to low to place a bet.... BustaBot will close now.');
| |
| 225 | engine.stop(); | |
| 226 | } | |
| 227 | else { // Changes basebet to 1 if balance is to low to make the current bet.
| |
| 228 | console.warn('[BustaBot] Your balance is to low to bet: ' + (CurrentBet / 100) + ' bits.');
| |
| 229 | BaseBet = 1; | |
| 230 | } | |
| 231 | } | |
| 232 | } | |
| 233 | } | |
| 234 | }); | |
| 235 | ||
| 236 | engine.on('cashed_out', function(data) {
| |
| 237 | if (data.username == engine.getUsername()) {
| |
| 238 | console.log('[BustaBot] Successfully cashed out at ' + (data.stopped_at / 100) + 'x');
| |
| 239 | SessionProfit = SessionProfit + (Unit * MaxSessionProfit); | |
| 240 | if(((engine.getBalance() - StartBalance) / 100).toFixed(2) > MaxProfit){
| |
| 241 | console.log('[BustaBot] Maximum profit reached, bot is shutting down...');
| |
| 242 | console.log('[BustaBot] You have made '+((engine.getBalance() - StartBalance) / 100).toFixed(2)+' profit this session.');
| |
| 243 | engine.stop(); | |
| 244 | } | |
| 245 | LastResult = "WON"; | |
| 246 | } | |
| 247 | }); | |
| 248 | ||
| 249 | ||
| 250 | engine.on('game_crash', function(data) {
| |
| 251 | var newdate = new Date(); | |
| 252 | var timeplaying = ((newdate.getTime() - StartTime) / 1000) / 60; | |
| 253 | if(Break == false){
| |
| 254 | console.log('[BustaBot] Game crashed at ' + (data.game_crash / 100) + 'x');
| |
| 255 | console.log('[BustaBot] Session profit: ' + ((engine.getBalance() - StartBalance) / 100).toFixed(2) + ' bits in ' + Math.round(timeplaying) + ' minutes.');
| |
| 256 | } else{
| |
| 257 | Break = false; | |
| 258 | } | |
| 259 | }); | |
| 260 | ||
| 261 | function randomNumber(min,max) | |
| 262 | {
| |
| 263 | return Math.floor(Math.random()*(max-min+1)+min); | |
| 264 | } |