Bustabit Martingale


SUBMITTED BY: Schizophrenia

DATE: April 23, 2016, 6:35 p.m.

UPDATED: April 24, 2016, 12:31 a.m.

FORMAT: Text only

SIZE: 10.4 kB

HITS: 2855

  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 = 1; //Default: 1 1 = Martingale, 2 = Paroli, 3 = D’Alembert, 4 = Pluscoup
  4. var MaxProfitMode = false; //Default: true If this setting is true, you will always bet ("PercentOfTotal" / 100 * your balance), if this setting is false you will just bet your BaseBet.
  5. var PercentOfTotal = .025; //Default: 1 If MaxProfitMode is true, your BaseBet will always be ("PercentOfTotal" / 100 * your balance). Default 0.1% of your total balance.
  6. var BaseBet = 1; //Default: 100 This is the value of your first bet (in bits).
  7. var Multiplier = 1.34; //Default: 2.0 This is the multiplier where the bot will stop (not on all game modes!).
  8. 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.
  9. var MaxBet = 1024; //Default: 1000000 The bot will never bet more than this amount (in bits).
  10. var MaxProfit = 2000; //Default: 100000 The bot will stop when your total balance is higher that this value (in bits).
  11. var MaxLoss = 400; //Default: 25000 You will never lose more than this amount (in bits). If a bet would exceed this amount, the bot stops automatically.
  12. var RandomBreak = 2; //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 )
  13. // Don't change anything below this if you don't know what you are doing!
  14. var Username = engine.getUsername();
  15. var StartBalance = engine.getBalance();
  16. var CurrentGameID = -1;
  17. var FirstGame = true;
  18. var CurrentBet = BaseBet;
  19. var CurrentMultiplier = Multiplier;
  20. var d = new Date();
  21. var StartTime = d.getTime();
  22. var LastResult = "WON";
  23. var Break = false;
  24. // Check previous bet
  25. var LastBet = 0;
  26. var LastProfit = 0;
  27. var NewProfit = 0;
  28. // Paroli variable's
  29. var ParoliRound = 1;
  30. var ParoliGame = 1;
  31. var StartBet = BaseBet;
  32. // Pluscoup variable's
  33. var Unit = 1;
  34. var SessionProfit = 0;
  35. var MaxSessionProfit = Multiplier - 1;
  36. // Paroli Confirm dialog to set Multiplier to X2.0.
  37. if(GameMode == 2){
  38. if (confirm("[BustaBot] Paroli is currently only available with the multiplier set to X2.0") == true) {
  39. // Do nothing and continue with the script.
  40. console.log('[BustaBot] Multiplier set to X2.0');
  41. } else {
  42. // Canceled Paroli mode, bot stopped.
  43. console.log('[BustaBot] Canceled paroli mode on multiplier X2.0');
  44. engine.stop();
  45. }
  46. }
  47. // D'alambert Confirm dialog to set Multiplier to X2.0.
  48. if(GameMode == 3){
  49. if (confirm("[BustaBot] D'alambert is currently only available with the multiplier set to X2.0") == true) {
  50. // Do nothing and continue with the script.
  51. console.log('[BustaBot] Multiplier set to X2.0');
  52. } else {
  53. // Canceled Paroli mode, bot stopped.
  54. console.log('[BustaBot] Canceled D alambert mode on multiplier X2.0');
  55. engine.stop();
  56. }
  57. }
  58. // Welcome message
  59. console.log('[BustaBot] Welcome ' + Username);
  60. console.log('[BustaBot] Your start ballance is: ' + (StartBalance / 100).toFixed(2) + ' bits');
  61. //check if the multiplier is 1 or higher.
  62. if(Multiplier < 1){
  63. console.log('[BustaBot] Your multiplier must be 1.0 or higher.');
  64. engine.stop();
  65. }
  66. if(GameMode < 1 || GameMode > 4){
  67. console.log('[BustaBot] Select a game mode between 1 and 4.');
  68. engine.stop();
  69. }
  70. // Start of a game.
  71. engine.on('game_starting', function(info) {
  72. CurrentGameID = info.game_id;
  73. console.log('---------------------');
  74. console.log('[BustaBot] Game #' + CurrentGameID + ' started.');
  75. var random = randomNumber(1,100);
  76. if(random < RandomBreak){
  77. console.log("Taking a break this round.");
  78. Break = true;
  79. }
  80. if(Break == false){
  81. if(MaxProfitMode == true){
  82. BaseBet = Math.round((PercentOfTotal / 100) * (engine.getBalance() / 100).toFixed(2));
  83. }
  84. if (LastResult == '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 = StartBet;
  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. StartBet = BaseBet;
  115. CurrentBet = StartBet;
  116. }
  117. if(ParoliGame == 2){
  118. CurrentBet = LastBet * 2;
  119. }
  120. if(ParoliGame == 3){
  121. CurrentBet = LastBet * 2;
  122. }
  123. console.log('[BustaBot] Paroli Round: ' + ParoliRound + ' Game: ' + ParoliGame);
  124. ParoliGame++;
  125. }
  126. if(GameMode == 3){// D'alambert
  127. CurrentMultiplier = 2;
  128. if(!FirstGame)
  129. {
  130. CurrentBet = LastBet - dalembert;
  131. }
  132. }
  133. if(GameMode == 4){// Pluscoup
  134. CurrentMultiplier = Multiplier;
  135. if(SessionProfit >= MaxSessionProfit)
  136. {
  137. StartBet = BaseBet;
  138. SessionProfit = 0;
  139. Unit = 1;
  140. }
  141. else
  142. {
  143. Unit ++;
  144. while((((Unit * Multiplier) - Unit) + SessionProfit) > MaxSessionProfit){
  145. Unit = Unit - 1;
  146. }
  147. }
  148. if(FirstGame){ Unit = 1; StartBet = BaseBet;}
  149. if(Unit < 1){
  150. Unit = 1;
  151. StartBet = BaseBet;
  152. }
  153. CurrentBet = Unit * StartBet;
  154. }
  155. }
  156. //check if current bet is 0 or negative
  157. if(CurrentBet < 1){
  158. CurrentBet = 1;
  159. }
  160. //Check if a Paroli round is finished and start new round for the next bet.
  161. if(ParoliGame == 4){
  162. ParoliGame = 1;
  163. ParoliRound++;
  164. }
  165. // First game is set to false.
  166. FirstGame = false;
  167. // Changing last result
  168. LastResult = "LOST";
  169. if(((engine.getBalance() / 100) - CurrentBet) < ((StartBalance / 100) - MaxLoss)){
  170. console.log('[BustaBot] This bet would Exceed Your maximum loss, the bot will stop now... ');
  171. engine.stop();
  172. }else{
  173. if (CurrentBet <= engine.getBalance()) { // Check if the balance is high enough to place the bet.
  174. if (CurrentBet > (MaxBet)) { // Check if the bet is higher than the given maximum bet by the user.
  175. console.warn('[BustaBot] Current bet exceeds your maximum bet. Your bet is changed to: ' + (MaxBet) + ' bits');
  176. CurrentBet = MaxBet;
  177. }
  178. console.log('[BustaBot] Betting ' + (CurrentBet) + ' bits, cashing out at ' + CurrentMultiplier + 'x');
  179. engine.placeBet(CurrentBet * 100, Math.round(CurrentMultiplier * 100), false);
  180. LastBet = CurrentBet;
  181. LastProfit = (CurrentBet * CurrentMultiplier) - CurrentBet;
  182. }
  183. else { // Not enough balance to place the bet.
  184. if (engine.getBalance() < 100) { // Stop the bot if balance is less then 100 bits.
  185. console.error('[BustaBot] Your account balance is to low to place a bet.... BustaBot will close now.');
  186. engine.stop();
  187. }
  188. else { // Changes basebet to 1 if balance is to low to make the current bet.
  189. console.warn('[BustaBot] Your balance is to low to bet: ' + (CurrentBet / 100) + ' bits.');
  190. BaseBet = 1;
  191. }
  192. }
  193. }
  194. }
  195. });
  196. engine.on('cashed_out', function(data) {
  197. if (data.username == engine.getUsername()) {
  198. console.log('[BustaBot] Successfully cashed out at ' + (data.stopped_at / 100) + 'x');
  199. SessionProfit = SessionProfit + (Unit * MaxSessionProfit);
  200. if(((engine.getBalance() - StartBalance) / 100).toFixed(2) > MaxProfit){
  201. console.log('[BustaBot] Maximum profit reached, bot is shutting down...');
  202. console.log('[BustaBot] You have made '+((engine.getBalance() - StartBalance) / 100).toFixed(2)+' profit this session.');
  203. engine.stop();
  204. }
  205. LastResult = "WON";
  206. }
  207. });
  208. engine.on('game_crash', function(data) {
  209. var newdate = new Date();
  210. var timeplaying = ((newdate.getTime() - StartTime) / 1000) / 60;
  211. if(Break == false){
  212. console.log('[BustaBot] Game crashed at ' + (data.game_crash / 100) + 'x');
  213. console.log('[BustaBot] Session profit: ' + ((engine.getBalance() - StartBalance) / 100).toFixed(2) + ' bits in ' + Math.round(timeplaying) + ' minutes.');
  214. } else{
  215. Break = false;
  216. }
  217. });
  218. function randomNumber(min,max)
  219. {
  220. return Math.floor(Math.random()*(max-min+1)+min);
  221. }

comments powered by Disqus