Guest User

Untitled

a guest
Jul 26th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.92 KB | None | 0 0
  1. //Settings
  2. var GameMode = 4; //Default: 5 1 = Martingale, 2 = Paroli, 3 = D’Alembert, 4 = Pluscoup, 5 = Recovery
  3. var MaxProfitMode = false; //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.
  4. var PercentOfTotal = 0.1; //Default: 0.1 If MaxProfitMode is true, your BaseBet will always be ("PercentOfTotal" * your balance). Default 0.1% of your total balance.
  5. var BaseBet = 5; //Default: 100 This is the value of your first bet (in bits) when MaxProfitMode is set to false.
  6. var Multiplier = 1.25; //Default: 1.05 This is the multiplier where the bot will stop (not on GameMode 2 and 3).
  7. 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.
  8. var MaxBet = 1000000; //Default: 1000000 The bot will never bet more than this amount (in bits).
  9. var MaxProfit = 20000; //Default: 100000 The bot will stop when your total balance is higher that this value (in bits).
  10. var MaxLoss = 30000; //Default: 25000 You will never lose more than this amount (in bits). If a bet would exceed this amount, the bot stops automatically.
  11. 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 )
  12.  
  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. // Recovery variable's
  37. var SessionLost = 0;
  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 > 5){
  74. console.log('[BustaBot] Select a game mode between 1 and 5.');
  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. if(GameMode == 5){// Recovery
  124. SessionLost = SessionLost + CurrentBet;
  125. CurrentBet = LastBet * 2;
  126. CurrentMultiplier = (SessionLost + CurrentBet) / CurrentBet;
  127. }
  128. }
  129. else { // If won last game or first game
  130.  
  131. if(GameMode == 1){// Martingale
  132. CurrentBet = BaseBet;
  133. CurrentMultiplier = Multiplier;
  134. }
  135.  
  136. if(GameMode == 2){// Paroli
  137. CurrentMultiplier = 2;
  138. if(ParoliGame == 1){
  139. StartBet = BaseBet;
  140. CurrentBet = StartBet;
  141. }
  142. if(ParoliGame == 2){
  143. CurrentBet = LastBet * 2;
  144. }
  145. if(ParoliGame == 3){
  146. CurrentBet = LastBet * 2;
  147. }
  148. console.log('[BustaBot] Paroli Round: ' + ParoliRound + ' Game: ' + ParoliGame);
  149. ParoliGame++;
  150. }
  151.  
  152. if(GameMode == 3){// D'alambert
  153. CurrentMultiplier = 2;
  154. if(!FirstGame)
  155. {
  156. CurrentBet = LastBet - dalembert;
  157. }
  158. }
  159.  
  160. if(GameMode == 4){// Pluscoup
  161. CurrentMultiplier = Multiplier;
  162. if(SessionProfit >= MaxSessionProfit)
  163. {
  164. StartBet = BaseBet;
  165. SessionProfit = 0;
  166. Unit = 1;
  167. }
  168. else
  169. {
  170. Unit ++;
  171. while((((Unit * Multiplier) - Unit) + SessionProfit) > MaxSessionProfit){
  172. Unit = Unit - 1;
  173. }
  174. }
  175. if(FirstGame){ Unit = 1; StartBet = BaseBet;}
  176. if(Unit < 1){
  177. Unit = 1;
  178. StartBet = BaseBet;
  179. }
  180. CurrentBet = Unit * StartBet;
  181. }
  182.  
  183. if(GameMode == 5){// Recovery
  184. SessionLost = 0;
  185. CurrentBet = BaseBet;
  186. CurrentMultiplier = Multiplier;
  187. }
  188.  
  189. }
  190.  
  191. //check if current bet is 0 or negative
  192. if(CurrentBet < 1){
  193. CurrentBet = 10;
  194. }
  195.  
  196. //Check if a Paroli round is finished and start new round for the next bet.
  197. if(ParoliGame == 4){
  198. ParoliGame = 1;
  199. ParoliRound++;
  200. }
  201.  
  202. // First game is set to false.
  203. FirstGame = false;
  204. // Changing last result
  205. LastResult = "LOST";
  206. if(((engine.getBalance() / 100) - CurrentBet) < ((StartBalance / 100) - MaxLoss)){
  207. console.log('[BustaBot] This bet would Exceed Your maximum loss, the bot will stop now... ');
  208. engine.stop();
  209. }else{
  210. if (CurrentBet <= engine.getBalance()) { // Check if the balance is high enough to place the bet.
  211. if (CurrentBet > (MaxBet)) { // Check if the bet is higher than the given maximum bet by the user.
  212. console.warn('[BustaBot] Current bet exceeds your maximum bet. Your bet is changed to: ' + (MaxBet) + ' bits');
  213. CurrentBet = MaxBet;
  214. }
  215. console.log('[BustaBot] Betting ' + (CurrentBet) + ' bits, cashing out at ' + CurrentMultiplier + 'x');
  216. engine.placeBet(CurrentBet * 100, Math.round(CurrentMultiplier * 100), false);
  217. LastBet = CurrentBet;
  218. LastProfit = (CurrentBet * CurrentMultiplier) - CurrentBet;
  219. }
  220. else { // Not enough balance to place the bet.
  221. if (engine.getBalance() < 100) { // Stop the bot if balance is less then 100 bits.
  222. console.error('[BustaBot] Your account balance is to low to place a bet.... BustaBot will close now.');
  223. engine.stop();
  224. }
  225. else { // Changes basebet to 1 if balance is to low to make the current bet.
  226. console.warn('[BustaBot] Your balance is to low to bet: ' + (CurrentBet / 100) + ' bits.');
  227. BaseBet = 1;
  228. }
  229. }
  230. }
  231. }
  232. });
  233.  
  234. engine.on('cashed_out', function(data) {
  235. if (data.username == engine.getUsername()) {
  236. console.log('[BustaBot] Successfully cashed out at ' + (data.stopped_at / 100) + 'x');
  237. SessionProfit = SessionProfit + (Unit * MaxSessionProfit);
  238. if(((engine.getBalance() - StartBalance) / 100).toFixed(2) > MaxProfit){
  239. console.log('[BustaBot] Maximum profit reached, bot is shutting down...');
  240. console.log('[BustaBot] You have made '+((engine.getBalance() - StartBalance) / 100).toFixed(2)+' profit this session.');
  241. engine.stop();
  242. }
  243. LastResult = "WON";
  244. }
  245. });
  246.  
  247.  
  248. engine.on('game_crash', function(data) {
  249. var newdate = new Date();
  250. var timeplaying = ((newdate.getTime() - StartTime) / 1000) / 60;
  251. if(Break == false){
  252. console.log('[BustaBot] Game crashed at ' + (data.game_crash / 100) + 'x');
  253. console.log('[BustaBot] Session profit: ' + ((engine.getBalance() - StartBalance) / 100).toFixed(2) + ' bits in ' + Math.round(timeplaying) + ' minutes.');
  254. } else{
  255. Break = false;
  256. }
  257. });
  258.  
  259. function randomNumber(min,max)
  260. {
  261. return Math.floor(Math.random()*(max-min+1)+min);
  262. }
Add Comment
Please, Sign In to add comment