SellingScripts

Untitled

Jan 9th, 2019
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.91 KB | None | 0 0
  1. var config = {
  2. msg: { type: 'noop', label: '-- Created By SellingScripts --' },
  3. baseBet: { value: 10000, type: 'balance', label: 'Base Bet' },
  4. crashTarget: { value: 5, type: 'multiplier', label: 'Cash Out' },
  5. multiOnloss: { value: 1.3, type: 'multiplier', label: 'Increase on Loss - First Cash Out' },
  6. playafterXgames: { value: 10, type: 'multiplier', label: 'Only Play After X Games' },
  7. underXgames: { value: 5, type: 'multiplier', label: 'Only Play After X Games UNDER this multiplier' },
  8. maxLosestreak1: { value: 15, type: 'text', label: 'Number of Reds Before Pausing' },
  9. maxSkipAfterGreen1: { value: 5, type: 'text', label: 'Number of Greens Before Resuming' },
  10. secondCrashTarget: { value: 10, type: 'multiplier', label: 'New Cash Out After Resuming' },
  11. secondMultiOnLoss1: { value: 1.15, type: 'text', label: 'Increase on Loss - Second Cash Out' },
  12. };
  13.  
  14. log('Script is running..');
  15. log('Welcome! Your balance is ' + userInfo.balance / 100 + ' bits!');
  16. log('Good Luck =)');
  17.  
  18.  
  19.  
  20. var maxLosestreak = parseFloat(config.maxLosestreak1.value);
  21. var maxSkipAfterGreen = parseFloat(config.maxSkipAfterGreen1.value);
  22. var secondMultiOnLoss = parseFloat(config.secondMultiOnLoss1.value);
  23.  
  24.  
  25.  
  26.  
  27. var lastBet;
  28.  
  29. var losestreak = 0;
  30. var skipAfterGreen = 0;
  31. var roundCounter = 0;
  32.  
  33. var isLosestreak = false;
  34. var isAfterGreen = false;
  35.  
  36.  
  37. var currentBet = 0;
  38. var Xgames = 0;
  39.  
  40.  
  41.  
  42. //Events to follow
  43. engine.on('GAME_STARTING', ongamestart);
  44. engine.on('GAME_ENDED', ongameend);
  45.  
  46. //Game Starting Event
  47. function ongamestart() {
  48. if (isAfterGreen) {
  49. engine.bet(roundBit(currentBet), config.secondCrashTarget.value);
  50. skipAfterGreen = 0;
  51. log("Betting: " + roundBit(currentBet) / 100 + " bits for " + config.secondCrashTarget.value + "x");
  52. } else {
  53. engine.bet(roundBit(currentBet), config.crashTarget.value);
  54. log("Betting: " + roundBit(currentBet) / 100 + " bits for " + config.crashTarget.value + "x");
  55. }
  56. }
  57.  
  58. //Game Ending Event
  59. function ongameend() {
  60. var lastGame = engine.history.first()
  61.  
  62. // Xgames counter
  63. if (lastGame.bust < config.underXgames.value) {
  64. Xgames++;
  65. } else {
  66. Xgames = 0;
  67. }
  68.  
  69. // Did we bet last round?
  70. if (lastGame.wager) {
  71. //We Won
  72. if (lastGame.cashedAt) {
  73. currentBet = 0;
  74. lastBet = 0;
  75. isAfterGreen = false;
  76. losestreak = 0;
  77. log("We won, cashed at: " + lastGame.cashedAt + "x");
  78. Xgames = 0;
  79. } else {
  80. losestreak++;
  81. log("We lost!");
  82.  
  83. if (losestreak >= maxLosestreak) {
  84. if (isLosestreak === false && isAfterGreen === true) {
  85. lastBet = currentBet * config.secondMultiOnLoss.value;
  86. } else if (isLosestreak === false) {
  87. lastBet = currentBet * config.multiOnloss.value;
  88. }
  89. currentBet = 0;
  90. isLosestreak = true;
  91. log("We will pause. Maximum of " + maxLosestreak + " losses reached.");
  92. } else {
  93. if (isAfterGreen) {
  94. currentBet *= secondMultiOnLoss;
  95. isLosestreak = false;
  96. log('We lost. Betting', roundBit(currentBet) / 100, 'next round');
  97. } else {
  98. currentBet *= config.multiOnloss.value;
  99. isLosestreak = false;
  100. log('We lost. Betting', roundBit(currentBet) / 100, 'next round');
  101. }
  102. }
  103. }
  104. } else {
  105. if (isLosestreak === true && roundCounter !== 0) {
  106. if (lastGame.bust >= 2) {
  107. skipAfterGreen++;
  108. losestreak = 0;
  109. isAfterGreen = false;
  110. log('The red streak ended, waiting for ' + maxSkipAfterGreen + ' greens before betting. ' + skipAfterGreen);
  111. if (skipAfterGreen >= maxSkipAfterGreen) {
  112. currentBet = lastBet;
  113. losestreak = 0;
  114. isAfterGreen = true;
  115. isLosestreak = false;
  116. log("We will resume. There has been " + maxSkipAfterGreen + " greens.");
  117. }
  118. }
  119. } else {
  120. if (Xgames >= config.playafterXgames.value) {
  121. currentBet = config.baseBet.value;
  122. log('X Games target of', config.playafterXgames.value, 'has been met. Next round we will bet. ');
  123. isAfterGreen = false;
  124. losestreak = 0;
  125. } else {
  126. currentBet = 0;
  127. log('X Games count', Xgames);
  128. losestreak = 0;
  129. }
  130. }
  131. }
  132. roundCounter++;
  133. }
  134.  
  135. //Math Rounding Function
  136. function roundBit(bet) {
  137. return Math.round(bet / 100) * 100;
  138. }
Advertisement
Add Comment
Please, Sign In to add comment