Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.01 KB | None | 0 0
  1. /
  2.  
  3. var ScriptName = `Agatha Simple Chaser`;
  4. var Version = `1.09`;
  5.  
  6. // Config Variables
  7. var BaseBet = 100; // Base Bet 1 = 1 Ethos
  8. var CashOut = 100; // CashOut 1000 = 1000.00x (1.25 = 1.25x)
  9. var onLossMultiplier = 2.00; // Manual Multiplier on Loss (1.00 for a Fixed Bet).
  10.  
  11. // Wait
  12. var gamePaused = true; // Wait for pausedGames < pauseCrash, and start Betting. True to Start the Script in Waiting mode.
  13. var pauseCrash = 5; // Wait pausedGames < 1000.00x (It can be same CashOut, or another diff X)
  14. var pausedGames = 5; // Wait 100 < pauseCrash
  15.  
  16. // Pause
  17. var pauseWinStreak = 1; // Consecutive Games to Win to force a Reset. (Useful when chasing low X as 1.15x)
  18. var pauseLossStreak = 3; // Consecutive Lossings to force a Reset. (Take the losses, after Chasing ... games)
  19.  
  20. // Stop
  21. var StopProfit = 20; // 10 = 10% Stop the bot if Profit is larger than 10%
  22. var StopLoss = 10; // 30 = 30% Stop the bot if Losses are larger than 30% of ATH BankRoll.
  23.  
  24.  
  25.  
  26. // Min & Max Bet Allowed
  27. var minBet = 1; // Min Allowed Bet
  28. var maxBet = Math.trunc(engine.getMaxBet() / 100); // Site Max Bet Limit.
  29.  
  30.  
  31. // ****************** Do not modify from here ********** ///
  32. var UserName = engine.getUsername();
  33. var InitBalance = CurrentBalance = MinBalance = MaxBalance = engine.getBalance();
  34. var CurrentGameID = -1;
  35. var d = new Date();
  36. var StartTime = d.getTime();
  37. var TimePlaying = 0;
  38. var CurrentBet = BaseBet;
  39. var TotalLoss = MaxLoss = 0;
  40. var LastSeen = 1;
  41. var lastGamePlay = 'NOT_PLAYED';
  42. var numWins = numLosses = numMissed = numNotPlayed = 0;
  43. var MaxWinStreak = MaxLossStreak = CurrentWinStreak = CurrentLossStreak = MaxGap = 0;
  44. var Profit = ProfitPercent = TotSavings = 0;
  45. var maxBetPlaced = maxRisked = maxCashedOut = 0;
  46. var CashOutProb = (9900 / (101 * ((100 * (CashOut * 100) / 100) - 1)) * 100);
  47.  
  48. maxBet = (maxBet > Math.trunc(engine.getMaxBet() / 100)) ? Math.trunc(engine.getMaxBet() / 100) : maxBet;
  49.  
  50. // *** Min Balance Required
  51. var ReqBalance = 1;
  52. for (i = 1; i < pauseLossStreak; i++) { ReqBalance += Math.ceil(Math.pow(onLossMultiplier, (i))); }
  53. ReqBalance = (ReqBalance * BaseBet) + BaseBet;
  54.  
  55. console.log('====== [', ScriptName, Version, '] ======');
  56. console.log("Heating Engines...");
  57. console.log('----- Script Settings -----');
  58. console.log('Balance:', InitBalance / 100, 'Ethos');
  59. console.log('CashOut:', CashOut + 'x');
  60. console.log('Base Bet:', BaseBet, 'Ethos');
  61. console.log("Stop Profit:", StopProfit + "% ", (InitBalance / 100 * StopProfit / 100), "Ethos (Balance >= " + (InitBalance / 100 + (InitBalance / 100 * StopProfit / 100)).toFixed(2) + ")");
  62. console.log("Stop Loss:", StopLoss + "% ", (MaxBalance / 100 * StopLoss / 100), "Ethos (Balance < " + (MaxBalance / 100 - (MaxBalance / 100 * StopLoss / 100)).toFixed(2) + ")");
  63. console.log('Stop Loss Streak:', pauseLossStreak, 'rounds');
  64.  
  65. console.log('Min Balance Required:', ReqBalance, 'Ethos');
  66.  
  67. if (InitBalance / 100 < ReqBalance) {
  68. console.log('Insufficient Balance', ReqBalance - InitBalance / 100, 'Ethos short.');
  69. console.log('Adjust your BaseBet to:', Math.floor(InitBalance / 100 / ReqBalance * BaseBet), 'Ethos');
  70. engine.stop();
  71. }
  72.  
  73.  
  74. engine.on('game_starting', function (info) {
  75.  
  76. CurrentGameID = info.game_id;
  77.  
  78. // Time Stats
  79. var newdate = new Date();
  80. TimePlaying = ((newdate.getTime() - StartTime) / 1000) / 60;
  81.  
  82. console.clear()
  83. console.log('====== [', ScriptName, Version, '] ======');
  84.  
  85. console.log('My username is: ' + engine.getUsername());
  86. console.log("Initial Balance:", (InitBalance / 100).toFixed(2), "Ethos");
  87. console.log("Current Balance:", (CurrentBalance / 100).toFixed(2), "Ethos", (CurrentBalance >= InitBalance ? '▲' : '▼'));
  88. console.log(' Min: ' + (MinBalance / 100).toFixed(2), "Ethos", '(' + ((InitBalance - MinBalance) / 100).toFixed(2) + ')');
  89. console.log(' Max: ' + (MaxBalance / 100).toFixed(2), "Ethos", '(' + ((MaxBalance - InitBalance) / 100).toFixed(2) + ') ' + (CurrentBalance >= MaxBalance ? '★' : ''));
  90.  
  91. console.log('====== Strat ======');
  92. console.log('Chasing', CashOut, '| Base Bet', Math.trunc(BaseBet), '| x' + onLossMultiplier.toFixed(5) + ' onLoss');
  93. console.log('Wait', Math.ceil(pausedGames), "<", pauseCrash, "Reset after", pauseLossStreak, "Losses or", pauseWinStreak, 'Wins');
  94. console.log('Min Bet:', Math.ceil(minBet), 'Ethos | Max Bet:', Math.ceil(maxBet), 'Ethos');
  95. console.log('Probability:', (CashOutProb).toFixed(2) + '% | Fallacy Prob:', ((LastSeen - 1) * 100 / (CashOut * 12) + CashOutProb).toFixed(2) + '%');
  96. console.log('Last', pauseCrash, 'Seen', LastSeen, 'games ago | Max Gap:', MaxGap);
  97.  
  98. console.log("====== Profit ======");
  99. console.log("Session Profit:", Profit, "Ethos", "(" + ProfitPercent + "%)");
  100. console.log("Target Profit:", StopProfit + "% ", (InitBalance / 100 * StopProfit / 100));
  101.  
  102. console.log("====== Loses ======");
  103. console.log("Total Loss:", Math.ceil(TotalLoss), "Ethos", "| Max:", Math.ceil(MaxLoss));
  104. console.log("Stop Loss:", StopLoss + "%", (MaxBalance / 100 * StopLoss / 100), " (<" + (MaxBalance / 100 - (MaxBalance / 100 * StopLoss / 100)).toFixed(2) + ")");
  105.  
  106. console.log("====== Stats ======");
  107. console.log('Wins:', numWins, '| Losses:', numLosses, '| Missed:', numMissed, '| NP:', numNotPlayed, '| ' + (numWins / numLosses >= Math.floor((1 / (CashOut - 1) + 1)) ? '▲' : '▼'));
  108. console.log("Win Streak:", MaxWinStreak, " | Loss Streak:", MaxLossStreak);
  109. console.log("Tot. Games:", (numWins + numLosses + numMissed + numNotPlayed), "in", Math.round(TimePlaying), "minutes.");
  110.  
  111. console.log('====== * ======');
  112. console.log('Wins in a Row:', CurrentWinStreak, 'of', pauseWinStreak, 'to Pause');
  113.  
  114. console.log('====== * ======');
  115. console.log("Game #", CurrentGameID, "| Max Bet:", maxBetPlaced, '@', maxCashedOut, 'Risked:', maxRisked);
  116. console.log('Last game Status: ' + lastGamePlay);
  117.  
  118.  
  119. // Pause (StopWinStreak or StopLossStreak)
  120. if (gamePaused) {
  121. if (CurrentLossStreak >= pauseLossStreak) {
  122. console.warn('Paused: Waiting next', pauseCrash + 'x');
  123. } else {
  124. console.warn('Paused: for', (pausedGames + 1 - LastSeen), 'games <', pauseCrash + 'x');
  125.  
  126. }
  127. document.title = `Paused | ${ProfitPercent}% ` + (CurrentBalance >= InitBalance ? '▲ ' : '▼ ') + (CurrentBalance >= MaxBalance ? '★' : '');
  128. }
  129.  
  130. if (!gamePaused) {
  131. var placeBet = Math.trunc(CurrentBet);
  132.  
  133. // StopLoss
  134. if (((CurrentBalance / 100) - placeBet) <= MaxBalance / 100 - (MaxBalance / 100 * StopLoss / 100)) {
  135. console.warn("Current bet of", placeBet, "will break your Stop Loss on your balance", (MaxBalance / 100).toFixed(2));
  136. console.warn("Game Over ☠");
  137. document.title = (`Game Over ☠`);
  138. engine.stop();
  139. } else {
  140.  
  141.  
  142. // Check if the balance is high enough to place the bet.
  143. if (placeBet <= CurrentBalance) {
  144.  
  145. console.log('--------------------');
  146. console.log("Betting", placeBet, "Ethos", ", CashOut", CashOut + 'x');
  147. console.log("Expected Profit", (placeBet * CashOut - placeBet - TotalLoss).toFixed(2), "Ethos");
  148. document.title = `Bet ${placeBet} @ ${CashOut}x | ${ProfitPercent}% ` + (CurrentBalance >= InitBalance ? '▲ ' : '▼ ') + (CurrentBalance >= MaxBalance ? '★' : '');
  149.  
  150. maxBetPlaced = Math.max(placeBet, maxBetPlaced);
  151. maxRisked = (Math.round(placeBet + TotalLoss) > maxRisked) ? Math.round(placeBet + TotalLoss) : maxRisked;
  152.  
  153. // Place Bet **********************************************
  154. engine.placeBet(Math.ceil(placeBet * 100), Math.ceil(CashOut * 100), false);
  155.  
  156. } else {
  157. // Not enough balance to place the bet.
  158. console.error("Your account balance is to low to place a bet....", ScriptName, "will close now.");
  159. engine.stop();
  160. }
  161. }
  162. }
  163. });
  164.  
  165. engine.on('cashed_out', function (data) {
  166. if (data.username == engine.getUsername()) {
  167. console.log('Successfully cashed out at ' + (data.stopped_at / 100) + 'x');
  168. maxCashedOut = (data.stopped_at / 100 > maxCashedOut) ? data.stopped_at / 100 : maxCashedOut;
  169. }
  170. });
  171.  
  172. engine.on('game_crash', function (data) {
  173. // Update Max & Min Balance Stats
  174. CurrentBalance = engine.getBalance();
  175. MinBalance = Math.min(CurrentBalance, MinBalance);
  176. MaxBalance = Math.max(CurrentBalance, MaxBalance);
  177. Profit = ((CurrentBalance - InitBalance) / 100);
  178. ProfitPercent = (((CurrentBalance / InitBalance) - 1) * 100).toFixed(2);
  179. TotalLoss = (MaxBalance / 100 - CurrentBalance / 100);
  180. MaxLoss = (TotalLoss > MaxLoss) ? TotalLoss : MaxLoss;
  181. lastGamePlay = engine.lastGamePlay();
  182. var gameCrash = data.game_crash;
  183.  
  184. console.log("Game crashed at", (gameCrash / 100) + 'x Profit:', Profit, "Ethos", "(" + ProfitPercent + "%)");
  185.  
  186.  
  187. // WIN: Return to Normal conditions.
  188. if (lastGamePlay == 'WON') {
  189.  
  190. // Stats
  191. numWins++;
  192. CurrentWinStreak++;
  193. CurrentLossStreak = 0;
  194. MaxWinStreak = (CurrentWinStreak > MaxWinStreak) ? CurrentWinStreak : MaxWinStreak;
  195.  
  196. CurrentBet = BaseBet;
  197. }
  198.  
  199. // LOST: Recovery routine.
  200. if (lastGamePlay == 'LOST') {
  201. // Stats
  202. numLosses++;
  203. CurrentLossStreak++;
  204. CurrentWinStreak = 0;
  205. MaxLossStreak = (CurrentLossStreak > MaxLossStreak) ? CurrentLossStreak : MaxLossStreak;
  206.  
  207. console.log('Game Lost...');
  208.  
  209. CurrentBet = CurrentBet * onLossMultiplier;
  210.  
  211. }
  212.  
  213. // Last Seen
  214. if (gameCrash < pauseCrash * 100) {
  215. LastSeen++;
  216. // NOT PLAYED:
  217. if (lastGamePlay == "NOT_PLAYED") {
  218. CurrentWinStreak = 0;
  219. numNotPlayed++;
  220. }
  221. }
  222.  
  223. // Target Missed
  224. if (gameCrash >= pauseCrash * 100) {
  225. LastSeen = 1;
  226. // NOT PLAYED:
  227. if (lastGamePlay == "NOT_PLAYED") {
  228. console.log('Target Missed...');
  229. CurrentLossStreak = 0;
  230. numMissed++;
  231. }
  232. }
  233.  
  234.  
  235. // Pause Handlers
  236. if (LastSeen > pausedGames && CurrentLossStreak < pauseLossStreak) { gamePaused = false; }
  237. if (CurrentWinStreak >= pauseWinStreak) { gamePaused = true; }
  238. if (CurrentLossStreak >= pauseLossStreak) { gamePaused = true; CurrentBet = BaseBet; }
  239.  
  240.  
  241. // Fix Limits
  242. CurrentBet = (CurrentBet > maxBet) ? maxBet : CurrentBet;
  243. CurrentBet = (CurrentBet < minBet) ? minBet : CurrentBet;
  244. MaxGap = Math.max(MaxGap, LastSeen);
  245.  
  246.  
  247.  
  248. //Target Profit Reached
  249. if (Profit > (InitBalance / 100 * StopProfit / 100)) {
  250. document.title = (`Agatha WON 🏆`);
  251. console.log("Target Profit reached, bot is shutting down...");
  252. console.log("You have made", Profit, "Ethos (" + ProfitPercent + "%) Profit this session.");
  253. engine.stop();
  254. }
  255.  
  256.  
  257. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement