Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.20 KB | None | 0 0
  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: 1 1 = Martingale, 2 = Paroli, 3 = D’Alembert, 4 = Pluscoup
  5. var MaxProfitMode = true; //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.
  6. var PercentOfTotal = 0.2; //Default: 1 If MaxProfitMode is true, your BaseBet will always be ("PercentOfTotal" / 100 * your balance). Default 0.1% of your total balance.
  7. var BaseBet = 50; //Default: 100 This is the value of your first bet (in bits).
  8. var Multiplier = 1.25; //Default: 2.0 This is the multiplier where the bot will stop (not on all game modes!).
  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 = 1000000; //Default: 1000000 The bot will never bet more than this amount (in bits).
  11. var MaxProfit = 100000; //Default: 100000 The bot will stop when your total balance is higher that this value (in bits).
  12. var MaxLoss = 25000; //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.  
  39. // Paroli Confirm dialog to set Multiplier to X2.0.
  40. if(GameMode == 2){
  41. if (confirm("[BustaBot] Paroli is currently only available with the multiplier set to X2.0") == true) {
  42. // Do nothing and continue with the script.
  43. console.log('[BustaBot] Multiplier set to X2.0');
  44. } else {
  45. // Canceled Paroli mode, bot stopped.
  46. console.log('[BustaBot] Canceled paroli mode on multiplier X2.0');
  47. engine.stop();
  48. }
  49. }
  50.  
  51. // D'alambert Confirm dialog to set Multiplier to X2.0.
  52. if(GameMode == 3){
  53. if (confirm("[BustaBot] D'alambert is currently only available with the multiplier set to X2.0") == true) {
  54. // Do nothing and continue with the script.
  55. console.log('[BustaBot] Multiplier set to X2.0');
  56. } else {
  57. // Canceled Paroli mode, bot stopped.
  58. console.log('[BustaBot] Canceled D alambert mode on multiplier X2.0');
  59. engine.stop();
  60. }
  61. }
  62.  
  63. // Welcome message
  64. console.log('[BustaBot] Welcome ' + Username);
  65. console.log('[BustaBot] Your start ballance is: ' + (StartBalance / 100).toFixed(2) + ' bits');
  66.  
  67. //check if the multiplier is 1 or higher.
  68. if(Multiplier < 1){
  69. console.log('[BustaBot] Your multiplier must be 1.0 or higher.');
  70. engine.stop();
  71. }
  72.  
  73. if(GameMode < 1 || GameMode > 4){
  74. console.log('[BustaBot] Select a game mode between 1 and 4.');
  75. engine.stop();
  76. }
  77.  
  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.  
  85. var random = randomNumber(1,100);
  86.  
  87. if(random < RandomBreak){
  88. console.log("Taking a break this round.");
  89. Break = true;
  90. }
  91.  
  92. if(Break == false){
  93.  
  94. if(MaxProfitMode == true){
  95. BaseBet = Math.round((PercentOfTotal / 100) * (engine.getBalance() / 100).toFixed(2));
  96. }
  97.  
  98. if (LastResult == 'LOST' && !FirstGame) { // Check if you lost the last game
  99. if(GameMode == 1){// Martingale
  100. NewProfit = LastBet + LastProfit;
  101. CurrentBet = Math.round((NewProfit / LastProfit) * LastBet);
  102. CurrentMultiplier = Multiplier;
  103. }
  104.  
  105. if(GameMode == 2){// Paroli
  106. CurrentMultiplier = 2;
  107. CurrentBet = StartBet;
  108. console.log('[BustaBot] Paroli Round: ' + ParoliRound + ' Game: ' + ParoliGame);
  109. ParoliGame++;
  110. }
  111.  
  112. if(GameMode == 3){// D’Alembert
  113. CurrentMultiplier = 2;
  114. CurrentBet = LastBet + dalembert;
  115. }
  116.  
  117. if(GameMode == 4){// Pluscoup
  118. SessionProfit = SessionProfit - Unit;
  119. CurrentBet = LastBet;
  120. CurrentMultiplier = Multiplier;
  121. }
  122. }
  123. else { // If won last game or first game
  124.  
  125. if(GameMode == 1){// Martingale
  126. CurrentBet = BaseBet;
  127. CurrentMultiplier = Multiplier;
  128. }
  129.  
  130. if(GameMode == 2){// Paroli
  131. CurrentMultiplier = 2;
  132. if(ParoliGame == 1){
  133. StartBet = BaseBet;
  134. CurrentBet = StartBet;
  135. }
  136. if(ParoliGame == 2){
  137. CurrentBet = LastBet * 2;
  138. }
  139. if(ParoliGame == 3){
  140. CurrentBet = LastBet * 2;
  141. }
  142. console.log('[BustaBot] Paroli Round: ' + ParoliRound + ' Game: ' + ParoliGame);
  143. ParoliGame++;
  144. }
  145.  
  146. if(GameMode == 3){// D'alambert
  147. CurrentMultiplier = 2;
  148. if(!FirstGame)
  149. {
  150. CurrentBet = LastBet - dalembert;
  151. }
  152. }
  153.  
  154. if(GameMode == 4){// Pluscoup
  155. CurrentMultiplier = Multiplier;
  156. if(SessionProfit >= MaxSessionProfit)
  157. {
  158. StartBet = BaseBet;
  159. SessionProfit = 0;
  160. Unit = 1;
  161. }
  162. else
  163. {
  164. Unit ++;
  165. while((((Unit * Multiplier) - Unit) + SessionProfit) > MaxSessionProfit){
  166. Unit = Unit - 1;
  167. }
  168. }
  169. if(FirstGame){ Unit = 1; StartBet = BaseBet;}
  170. if(Unit < 1){
  171. Unit = 1;
  172. StartBet = BaseBet;
  173. }
  174. CurrentBet = Unit * StartBet;
  175. }
  176.  
  177. }
  178.  
  179. //check if current bet is 0 or negative
  180. if(CurrentBet < 1){
  181. CurrentBet = 1;
  182. }
  183.  
  184. //Check if a Paroli round is finished and start new round for the next bet.
  185. if(ParoliGame == 4){
  186. ParoliGame = 1;
  187. ParoliRound++;
  188. }
  189.  
  190. // First game is set to false.
  191. FirstGame = false;
  192. // Changing last result
  193. LastResult = "LOST";
  194. if(((engine.getBalance() / 100) - CurrentBet) < ((StartBalance / 100) - MaxLoss)){
  195. console.log('[BustaBot] This bet would Exceed Your maximum loss, the bot will stop now... ');
  196. engine.stop();
  197. }else{
  198. if (CurrentBet <= engine.getBalance()) { // Check if the balance is high enough to place the bet.
  199. if (CurrentBet > (MaxBet)) { // Check if the bet is higher than the given maximum bet by the user.
  200. console.warn('[BustaBot] Current bet exceeds your maximum bet. Your bet is changed to: ' + (MaxBet) + ' bits');
  201. CurrentBet = MaxBet;
  202. }
  203. console.log('[BustaBot] Betting ' + (CurrentBet) + ' bits, cashing out at ' + CurrentMultiplier + 'x');
  204. engine.placeBet(CurrentBet * 100, Math.round(CurrentMultiplier * 100), false);
  205. LastBet = CurrentBet;
  206. LastProfit = (CurrentBet * CurrentMultiplier) - CurrentBet;
  207. }
  208. else { // Not enough balance to place the bet.
  209. if (engine.getBalance() < 100) { // Stop the bot if balance is less then 100 bits.
  210. console.error('[BustaBot] Your account balance is to low to place a bet.... BustaBot will close now.');
  211. engine.stop();
  212. }
  213. else { // Changes basebet to 1 if balance is to low to make the current bet.
  214. console.warn('[BustaBot] Your balance is to low to bet: ' + (CurrentBet / 100) + ' bits.');
  215. BaseBet = 1;
  216. }
  217. }
  218. }
  219. }
  220. });
  221.  
  222. engine.on('cashed_out', function(data) {
  223. if (data.username == engine.getUsername()) {
  224. console.log('[BustaBot] Successfully cashed out at ' + (data.stopped_at / 100) + 'x');
  225. SessionProfit = SessionProfit + (Unit * MaxSessionProfit);
  226. if(((engine.getBalance() - StartBalance) / 100).toFixed(2) > MaxProfit){
  227. console.log('[BustaBot] Maximum profit reached, bot is shutting down...');
  228. console.log('[BustaBot] You have made '+((engine.getBalance() - StartBalance) / 100).toFixed(2)+' profit this session.');
  229. engine.stop();
  230. }
  231. LastResult = "WON";
  232. }
  233. });
  234.  
  235.  
  236. engine.on('game_crash', function(data) {
  237. var newdate = new Date();
  238. var timeplaying = ((newdate.getTime() - StartTime) / 1000) / 60;
  239. if(Break == false){
  240. console.log('[BustaBot] Game crashed at ' + (data.game_crash / 100) + 'x');
  241. console.log('[BustaBot] Session profit: ' + ((engine.getBalance() - StartBalance) / 100).toFixed(2) + ' bits in ' + Math.round(timeplaying) + ' minutes.');
  242. } else{
  243. Break = false;
  244. }
  245. });
  246.  
  247. function randomNumber(min,max)
  248. {
  249. return Math.floor(Math.random()*(max-min+1)+min);
  250. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement