Advertisement
Guest User

Untitled

a guest
Dec 10th, 2023
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.37 KB | None | 0 0
  1. var config = {
  2. baseBet: { value: 0.01, type: "number", label: "Base Bet (% of deposit)" },
  3. chasingMultiplier: { value: 10, type: "number", label: "Multiplier" },
  4. gamesToWait: {
  5. value: 15,
  6. type: "number",
  7. label: "Games to wait before making a bet",
  8. },
  9. multiplyOrAdd: {
  10. value: "multiply",
  11. type: "radio",
  12. label: "Multiply or Add",
  13. options: [
  14. { value: "multiply", label: "Multiply by" },
  15. { value: "add", label: "Add to bet" },
  16. ],
  17. },
  18. multiplyOrAddValue: {
  19. value: 2,
  20. type: "number",
  21. label: "Value for Multiply or Add",
  22. },
  23. stopCondition: {
  24. value: "maxBet",
  25. type: "radio",
  26. label: "Stop condition",
  27. options: [
  28. { value: "maxBet", label: "Stop if bet is more than" },
  29. {
  30. value: "negativeProfit",
  31. label: "Stop if negative profit is more than",
  32. },
  33. ],
  34. },
  35. stopConditionValue: {
  36. value: 10000,
  37. type: "number",
  38. label: "Value for Stop condition",
  39. },
  40. };
  41.  
  42. function main() {
  43. const minAmount = currency.minAmount.toString().length - 2;
  44. let balance = currency.amount;
  45. let baseBet = (balance * config.baseBet.value) / 100;
  46.  
  47. log.info(`Balance: ${balance}`);
  48. log.info(`Base bet: ${baseBet}`);
  49.  
  50. let multiplier = config.chasingMultiplier.value;
  51. let gamesToWait = config.gamesToWait.value;
  52.  
  53. let multiplyOrAdd = config.multiplyOrAdd.value;
  54. let multiplyValue, addValue;
  55. if (multiplyOrAdd === "multiply") {
  56. multiplyValue = config.multiplyOrAddValue.value;
  57. }
  58. if (multiplyOrAdd === "add") {
  59. addValue = config.multiplyOrAddValue.value;
  60. }
  61.  
  62. let stopCondition = config.stopCondition.value;
  63. let maxBet, maxNegativeProfit;
  64. if (stopCondition === "maxBet") {
  65. maxBet = config.stopConditionValue.value;
  66. }
  67. if (stopCondition === "negativeProfit") {
  68. maxNegativeProfit = config.stopConditionValue.value;
  69. }
  70.  
  71. let isBetting = false;
  72. let userProfit = 0;
  73. let gamesWithoutMultiplier = gamesWithoutX(multiplier);
  74. let bettingGames = 0;
  75. let numberOfCashOuts = 0;
  76.  
  77. log.info("FIRST LAUNCH | WELCOME!");
  78. log.info(
  79. `It has been ${gamesWithoutMultiplier} games without ${multiplier}x.`
  80. );
  81. log.info(`----------------------------`);
  82.  
  83. game.on("GAME_STARTING", function () {
  84. log.info(`****************************`);
  85. log.info(`🚀 NEW GAME`);
  86. log.info(`${new Date().toString()}`);
  87. log.info(`Balance: ${balance}`);
  88. log.info(`Games without ${multiplier}x: ${gamesWithoutMultiplier}.`);
  89. log.info(
  90. `Actual profit using the script: ${userProfit}. Got ${numberOfCashOuts} times ${multiplier}x.`
  91. );
  92.  
  93. if (gamesWithoutMultiplier >= gamesToWait) {
  94. let tempBaseBet = baseBet;
  95. game.bet(tempBaseBet, multiplier);
  96. isBetting = true;
  97. let currentBet = tempBaseBet;
  98. let wantedProfit = currentBet * (multiplier - 1) + userProfit;
  99. log.info(
  100. `Betting ${currentBet} right now, looking for ${wantedProfit} total profit.`
  101. );
  102. } else {
  103. isBetting = false;
  104. let calculatedGamesToWait = gamesToWait - gamesWithoutMultiplier;
  105. if (calculatedGamesToWait === 1) {
  106. log.info(`Betting ${baseBet} next game!`);
  107. } else {
  108. log.info(
  109. `Waiting for ${calculatedGamesToWait} more games with no ${multiplier}x`
  110. );
  111. }
  112. }
  113. });
  114.  
  115. game.on("GAME_ENDED", function () {
  116. let gameInfos = game.history[0];
  117. if (isBetting) {
  118. if (!gameInfos.cashedAt) {
  119. log.error("Lost...");
  120. userProfit -= baseBet;
  121. balance -= baseBet;
  122. bettingGames++;
  123. if (
  124. bettingGames === multiplier - 1 ||
  125. (bettingGames > multiplier &&
  126. (bettingGames % multiplier === 0 ||
  127. bettingGames % multiplier === multiplier / 2))
  128. ) {
  129. if (multiplyValue !== undefined) {
  130. baseBet *= multiplyValue;
  131. }
  132. if (addValue !== undefined) {
  133. baseBet += addValue;
  134. }
  135. }
  136.  
  137. if (maxBet !== undefined && baseBet > maxBet) {
  138. log.info(
  139. `Script stopped. Max bet reached: ${maxBet}. Profit is: ${userProfit}.`
  140. );
  141. game.stop();
  142. } else if (
  143. maxNegativeProfit !== undefined &&
  144. userProfit > maxNegativeProfit
  145. ) {
  146. log.info(
  147. `Script stopped. Max negative profit reached: ${userProfit}. Next bet would have been: ${baseBet}`
  148. );
  149. game.stop();
  150. }
  151. } else {
  152. userProfit = userProfit + (baseBet * multiplier - baseBet);
  153. balance = balance + (baseBet * multiplier - baseBet);
  154. baseBet = (balance * config.baseBet.value) / 100;
  155. bettingGames = 0;
  156. numberOfCashOuts++;
  157. log.success(`💰 Won! Increasing base bet to ${baseBet}`);
  158. log.info(`New balance: ${balance}`);
  159. log.info(`New bet: ${baseBet}`);
  160. }
  161. }
  162.  
  163. if (gameInfos.odds >= multiplier) {
  164. gamesWithoutMultiplier = 0;
  165. } else {
  166. gamesWithoutMultiplier++;
  167. }
  168.  
  169. log.info(`Current profit: ${userProfit}.`);
  170. log.info("END GAME");
  171. });
  172.  
  173. function gamesWithoutX(x) {
  174. let gamesArray = game.history;
  175. let result = 0;
  176.  
  177. for (let i = 0; i < gamesArray.length; i++) {
  178. if (gamesArray[i].odds >= x) {
  179. break;
  180. }
  181. result++;
  182. }
  183. return result;
  184. }
  185. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement