bustabit


SUBMITTED BY: deejannon

DATE: April 22, 2016, 4:39 a.m.

FORMAT: Text only

SIZE: 7.2 kB

HITS: 2111

  1. //[WARNING] Use this script at your own risk, nobody is responsible if you lose money on bustabit when you use this bot.
  2. //Settings
  3. var GameMode = 4; //Default: 1 1 = Martingale, 2 = Paroli, 3 = D’Alembert, 4 = Pluscoup
  4. var BaseBet = 100; //Default: 100 This is the value of your first bet (in bits).
  5. var Multiplier = 1.25; //Default: 2.0 This is the multiplier where the bot will stop (not on all game modes!).
  6. 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.
  7. var MaxBet = 1000; //Default: 100000 The bot will never bet more than this amount (in bits).
  8. var UseChat = true; //Default: true If this is set to true the bot will show messages in the chatbox when you start the bot or when you win a decent amount of bits!
  9. // Don't change anything below this if you don't know what you are doing!
  10. var Username = engine.getUsername();
  11. var StartBalance = engine.getBalance();
  12. var CurrentGameID = -1;
  13. var FirstGame = true;
  14. var CurrentBet = BaseBet;
  15. var CurrentMultiplier = Multiplier;
  16. var d = new Date();
  17. var StartTime = d.getTime();
  18. // Check previous bet
  19. var LastBet = 0;
  20. var LastProfit = 0;
  21. var NewProfit = 0;
  22. // Paroli variable's
  23. var ParoliRound = 1;
  24. var ParoliGame = 1;
  25. // Pluscoup variable's
  26. var Unit = 1;
  27. var SessionProfit = 0;
  28. var MaxSessionProfit = Multiplier - 1;
  29. // Paroli Confirm dialog to set Multiplier to X2.0.
  30. if(GameMode == 2){
  31. if (confirm("[BustaBot] Paroli is currently only available with the multiplier set to X2.0") == true) {
  32. // Do nothing and continue with the script.
  33. console.log('[BustaBot] Multiplier set to X2.0');
  34. } else {
  35. // Canceled Paroli mode, bot stopped.
  36. console.log('[BustaBot] Canceled paroli mode on multiplier X2.0');
  37. engine.stop();
  38. }
  39. }
  40. // D'alambert Confirm dialog to set Multiplier to X2.0.
  41. if(GameMode == 3){
  42. if (confirm("[BustaBot] D'alambert is currently only available with the multiplier set to X2.0") == true) {
  43. // Do nothing and continue with the script.
  44. console.log('[BustaBot] Multiplier set to X2.0');
  45. } else {
  46. // Canceled Paroli mode, bot stopped.
  47. console.log('[BustaBot] Canceled D alambert mode on multiplier X2.0');
  48. engine.stop();
  49. }
  50. }
  51. // Welcome message
  52. console.log('[BustaBot] Welcome ' + Username);
  53. console.log('[BustaBot] Your start ballance is: ' + (StartBalance / 100).toFixed(2) + ' bits');
  54. if (UseChat) {
  55. var gamemode = '';
  56. if(GameMode == 1){
  57. gamemode = '1 (Martingale)';
  58. }
  59. if(GameMode == 2){
  60. gamemode = '2 (Paroli)';
  61. }
  62. if(GameMode == 3){
  63. gamemode = "3 (D'alambert)";
  64. }
  65. if(GameMode == 4){
  66. gamemode = "4 (Pluscoup)";
  67. }
  68. engine.chat('[BustaBot] ' + Username + ' started BustaBot on game mode: ' + gamemode);
  69. }
  70. //check if the multiplier is 1 or higher.
  71. if(Multiplier < 1){
  72. console.log('[BustaBot] Your multiplier must be 1.0 or higher.');
  73. engine.stop();
  74. }
  75. if(GameMode < 1 || GameMode > 4){
  76. console.log('[BustaBot] Select a game mode between 1 and 4.');
  77. engine.stop();
  78. }
  79. // Start of a game.
  80. engine.on('game_starting', function(info) {
  81. CurrentGameID = info.game_id;
  82. console.log('---------------------');
  83. console.log('[BustaBot] Game #' + CurrentGameID + ' started.');
  84. if (engine.lastGamePlay() == 'LOST' && !FirstGame) { // Check if you lost the last game
  85. if(GameMode == 1){// Martingale
  86. NewProfit = LastBet + LastProfit;
  87. CurrentBet = Math.round((NewProfit / LastProfit) * LastBet);
  88. CurrentMultiplier = Multiplier;
  89. }
  90. if(GameMode == 2){// Paroli
  91. CurrentMultiplier = 2;
  92. CurrentBet = BaseBet;
  93. console.log('[BustaBot] Paroli Round: ' + ParoliRound + ' Game: ' + ParoliGame);
  94. ParoliGame++;
  95. }
  96. if(GameMode == 3){// D’Alembert
  97. CurrentMultiplier = 2;
  98. CurrentBet = LastBet + dalembert;
  99. }
  100. if(GameMode == 4){// Pluscoup
  101. SessionProfit = SessionProfit - Unit;
  102. CurrentBet = LastBet;
  103. CurrentMultiplier = Multiplier;
  104. }
  105. }
  106. else { // If won last game or first game
  107. if(GameMode == 1){// Martingale
  108. CurrentBet = BaseBet;
  109. CurrentMultiplier = Multiplier;
  110. }
  111. if(GameMode == 2){// Paroli
  112. CurrentMultiplier = 2;
  113. if(ParoliGame == 1){
  114. CurrentBet = BaseBet;
  115. }
  116. if(ParoliGame == 2){
  117. CurrentBet = LastBet * 2;
  118. }
  119. if(ParoliGame == 3){
  120. CurrentBet = LastBet * 2;
  121. }
  122. console.log('[BustaBot] Paroli Round: ' + ParoliRound + ' Game: ' + ParoliGame);
  123. ParoliGame++;
  124. }
  125. if(GameMode == 3){// D'alambert
  126. CurrentMultiplier = 2;
  127. if(!FirstGame)
  128. {
  129. CurrentBet = LastBet - dalembert;
  130. }
  131. }
  132. if(GameMode == 4){// Pluscoup
  133. CurrentMultiplier = Multiplier;
  134. if(SessionProfit >= MaxSessionProfit)
  135. {
  136. SessionProfit = 0;
  137. Unit = 1;
  138. }
  139. else
  140. {
  141. Unit ++;
  142. while((((Unit * Multiplier) - Unit) + SessionProfit) > MaxSessionProfit){
  143. Unit = Unit - 1;
  144. }
  145. }
  146. if(FirstGame){ Unit = 1;}
  147. if(Unit < 1){
  148. Unit = 1;
  149. }
  150. CurrentBet = Unit * BaseBet;
  151. }
  152. }
  153. //check if current bet is 0 or negative
  154. if(CurrentBet < 1){
  155. CurrentBet = 1;
  156. }
  157. //Check if a Paroli round is finished and start new round for the next bet.
  158. if(ParoliGame == 4){
  159. ParoliGame = 1;
  160. ParoliRound++;
  161. }
  162. // First game is set to false.
  163. FirstGame = false;
  164. if (CurrentBet <= engine.getBalance()) { // Check if the balance is high enough to place the bet.
  165. if (CurrentBet > (MaxBet)) { // Check if the bet is higher than the given maximum bet by the user.
  166. console.warn('[BustaBot] Current bet exceeds your maximum bet. Your bet is changed to: ' + (MaxBet) + ' bits');
  167. CurrentBet = MaxBet;
  168. }
  169. console.log('[BustaBot] Betting ' + (CurrentBet) + ' bits, cashing out at ' + CurrentMultiplier + 'x');
  170. engine.placeBet(CurrentBet * 100, Math.round(CurrentMultiplier * 100), false);
  171. LastBet = CurrentBet;
  172. LastProfit = (CurrentBet * CurrentMultiplier) - CurrentBet;
  173. }
  174. else { // Not enough balance to place the bet.
  175. if (engine.getBalance() < 100) { // Stop the bot if balance is less then 100 bits.
  176. console.error('[BustaBot] Your account balance is to low to place a bet.... BustaBot will close now.');
  177. engine.stop();
  178. }
  179. else { // Changes basebet to 1 if balance is to low to make the current bet.
  180. console.warn('[BustaBot] Your balance is to low to bet: ' + (CurrentBet / 100) + ' bits.');
  181. BaseBet = 1;
  182. }
  183. }
  184. });
  185. engine.on('cashed_out', function(data) {
  186. if (data.username == engine.getUsername()) {
  187. console.log('[BustaBot] Successfully cashed out at ' + (data.stopped_at / 100) + 'x');
  188. SessionProfit = SessionProfit + (Unit * MaxSessionProfit);
  189. }
  190. });
  191. engine.on('game_crash', function(data) {
  192. var newdate = new Date();
  193. var timeplaying = ((newdate.getTime() - StartTime) / 1000) / 60;
  194. console.log('[BustaBot] Game crashed at ' + (data.game_crash / 100) + 'x');
  195. console.log('[BustaBot] Session profit: ' + ((engine.getBalance() - StartBalance) / 100).toFixed(2) + ' bits in ' + Math.round(timeplaying) + ' minutes.');
  196. });

comments powered by Disqus