Flawless


SUBMITTED BY: Marouenbj

DATE: Feb. 6, 2017, 6:22 p.m.

FORMAT: Text only

SIZE: 7.8 kB

HITS: 637

  1. ProconBot Modified by ProconBot.
  2. Some things are changed or upgraded, please do not change anything if you don't know what you are doing.
  3. Disclaimer: All rights are reserved for the original creator of this script.
  4. Copy from here:
  5. // Settings
  6. var baseBet = 10;
  7. // In bits
  8. var baseMultiplier = 1.13;
  9. // Target multiplier: 1.13 recommended
  10. var variableBase = true;
  11. // Enable variable mode (very experimental), read y.
  12. var streakSecurity = 5;
  13. // Number of loss-streak you wanna be safe for. Increasing this massively reduces the variableBase calculated. (1-loss = 20%, 2-loss = 5%, 3-loss = 1.25% of your maximum balance). Recommended: 2+
  14. var maximumBet = 999999;
  15. // Maximum bet the bot will do (in bits).
  16. var percentageOfTotal = 100;
  17. // Percentage of total balance to use when max loss is hit. (100 = 100%)
  18. var useCrashAverage = false;
  19. // Enable editing current multiplier based on past 4 crash average. (Experimental!)
  20. var highAverage = 1.80;
  21. // Average multiplier to use the highAverageMultiplier.
  22. var highAverageMultiplier = 1.30;
  23. // Multiplier to use when crash average is above highAverage.
  24. var BustaBit = true;
  25. // Enable when using BustaBit, disable when using CS:GO Crash. (Changed how the script grabs your username)
  26. // Variables - Do not touch!
  27. var baseSatoshi = baseBet * 100; // Calculated
  28. var currentBet = baseSatoshi;
  29. var currentMultiplier = baseMultiplier;
  30. var currentGameID = -1;
  31. var firstGame = true;
  32. var lossStreak = 0;
  33. var coolingDown = false;
  34. var d = new Date();
  35. var startTime = d.getTime();
  36. var takingBreak = false;
  37. var takeBreaks = false; // Broken, disabled
  38. var lowAverage = 1.45;
  39. var tempCrash;
  40. var gameAverage;
  41. var currentGame = 0;
  42. var game1;
  43. var game2;
  44. var game3;
  45. var game4;
  46. // Initialization
  47. console.log('====== Procon\'s BustaBit Bot ======');
  48. console.log('====== Re-coded by CurtisVL ======');
  49. if(BustaBit == true){
  50. console.log('My username is: ' + engine.getUsername());
  51. }
  52. else{
  53. console.log('My username is: ' + engine.getSteamID());
  54. }
  55. console.log('Starting balance: ' + (engine.getBalance() / 100).toFixed(2) + ' bits');
  56. var startingBalance = engine.getBalance();
  57. if (variableBase) {
  58. console.warn('[WARN] Variable mode is enabled and not fully tested. Bot is resillient to ' + streakSecurity + '-loss streaks.');
  59. }
  60. // On a game starting, place the bet.
  61. engine.on('game_starting', function(info) {
  62. console.log('====== New Game ======');
  63. console.log('[Bot] Game #' + info.game_id);
  64. currentGameID = info.game_id;
  65. if(game4 != null && useCrashAverage == true){
  66. gameAverage = (((game1 + game2) + (game3 + game4)) / 4);
  67. console.log("[Bot] Average crash: " + gameAverage + "x");
  68. }
  69. else{
  70. gameAverage = 0;
  71. }
  72. if (coolingDown) {
  73. if (lossStreak == 0) {
  74. coolingDown = false;
  75. }
  76. else {
  77. lossStreak--;
  78. console.log('[Bot] Cooling down! Games remaining: ' + lossStreak);
  79. return;
  80. }
  81. }
  82. if(gameAverage <= lowAverage && takeBreaks == true && game4 != null){
  83. takingBreak = true;
  84. console.log("Too low average. Taking a break this round!");
  85. }
  86. else{
  87. takingBreak = false;
  88. }
  89. if (!firstGame) { // Display data only after first game played.
  90. console.log('[Stats] Session profit: ' + ((engine.getBalance() - startingBalance) / 100).toFixed(2) + ' bits in '+ Math.round(timeplaying) + ' minutes.');
  91. console.log('[Stats] Profit percentage: ' + (((engine.getBalance() / startingBalance) - 1) * 100).toFixed(2) + '%');
  92. }
  93. if(firstGame == true){
  94. newdate = new Date();
  95. timeplaying = ((newdate.getTime() - startTime) / 1000) / 60;
  96. }
  97. if (engine.lastGamePlay() == 'LOST' && !firstGame && takingBreak == false) { // If last game loss:
  98. lossStreak++;
  99. var totalLosses = 0; // Total satoshi lost.
  100. var lastLoss = currentBet; // Store our last bet.
  101. while (lastLoss >= baseSatoshi) { // Until we get down to base bet, add the previous losses.
  102. totalLosses += lastLoss;
  103. lastLoss /= 4;
  104. }
  105. if (lossStreak > streakSecurity) { // If we're on a loss streak, wait a few games!
  106. coolingDown = true;
  107. return;
  108. }
  109. currentBet *= 4; // Then multiply base bet by 4!
  110. currentMultiplier = 1 + (totalLosses / currentBet);
  111. }
  112. else { // Otherwise if win or first game:
  113. lossStreak = 0; // If it was a win, we reset the lossStreak.
  114. if (variableBase) { // If variable bet enabled.
  115. // Variable mode resists (currently) 1 loss, by making sure you have enough to cover the base and the 4x base bet.
  116. var divider = 100;
  117. for (i = 0; i < streakSecurity; i++) {
  118. divider += (100 * Math.pow(4, (i + 1)));
  119. }
  120. newBaseBet = Math.min(Math.max(1, Math.floor((percentageOfTotal/100) * engine.getBalance() / divider)), maximumBet * 100); // In bits
  121. newBaseSatoshi = newBaseBet * 100;
  122. if ((newBaseBet != baseBet) || (newBaseBet == 1)) {
  123. console.log('[Bot] Variable mode has changed base bet to: ' + newBaseBet + ' bits');
  124. baseBet = newBaseBet;
  125. baseSatoshi = newBaseSatoshi;
  126. }
  127. }
  128. currentMultiplier = baseMultiplier;
  129. if(lossStreak == 0 && useCrashAverage == true && gameAverage != 0){
  130. if(gameAverage < highAverage){
  131. currentMultiplier = baseMultiplier;
  132. }
  133. if(gameAverage >= highAverage){
  134. currentMultiplier = highAverageMultiplier;
  135. }
  136. }
  137. // Update bet.
  138. currentBet = baseSatoshi; // in Satoshi
  139. }
  140. // Message and set first game to false to be sure.
  141. console.log('[Bot] Betting ' + (currentBet / 100) + ' bits, cashing out at ' + currentMultiplier + 'x');
  142. firstGame = false;
  143. if (currentBet <= engine.getBalance() && takingBreak == false) { // Ensure we have enough to bet
  144. if (currentBet > (maximumBet * 100)) { // Ensure you only bet the maximum.
  145. console.warn('[Warn] Bet size exceeds maximum bet, lowering bet to ' + (maximumBet * 100) + ' bits');
  146. currentBet = maximumBet;
  147. }
  148. engine.placeBet(currentBet, Math.round(currentMultiplier * 100), false);
  149. }
  150. else { // Otherwise insufficent funds...
  151. if (engine.getBalance() < 100) {
  152. console.error('[Bot] Insufficent funds to do anything... stopping');
  153. engine.stop();
  154. }
  155. else {
  156. console.warn('[Bot] Insufficent funds to bet ' + (currentBet / 100) + ' bits.');
  157. console.warn('[Bot] Resetting to 1 bit basebet');
  158. baseBet = 1;
  159. baseSatoshi = 100;
  160. }
  161. }
  162. });
  163. //Game Started
  164. engine.on('game_started', function(data) {
  165. if (!firstGame) { console.log('[Bot] Game #' + currentGameID + ' has started!'); }
  166. });
  167. //Cashed Out
  168. engine.on('cashed_out', function(data) {
  169. if(BustaBit == true){
  170. if (data.username == engine.getUsername()) {
  171. console.log('[Bot] Successfully cashed out at ' + (data.stopped_at / 100) + 'x');
  172. }
  173. }
  174. });
  175. //Game Crash
  176. engine.on('game_crash', function(data) {
  177. if(BustaBit == false){
  178. if (data.username == engine.getSteamID()) {
  179. console.log('[Bot] Successfully cashed out at ' + (data.stopped_at / 100) + 'x');
  180. }
  181. }
  182. if (!firstGame) { console.log('[Bot] Game crashed at ' + (data.game_crash / 100) + 'x'); }
  183. newdate = new Date();
  184. timeplaying = ((newdate.getTime() - startTime) / 1000) / 60;
  185. currentGame++;
  186. tempCrash = (data.game_crash / 100);
  187. if (tempCrash >= 2.0){
  188. tempCrash = 2.0;
  189. }
  190. if (currentGame == 1){
  191. game1 = tempCrash;
  192. }
  193. else if(currentGame == 2){
  194. game2 = tempCrash;
  195. }
  196. else if(currentGame == 3){
  197. game3 = tempCrash;
  198. }
  199. else if(currentGame == 4){
  200. game4 = tempCrash;
  201. }
  202. else if(currentGame >= 5){
  203. currentGame = 1;
  204. game1 = tempCrash;
  205. }
  206. });

comments powered by Disqus