Advertisement
Guest User

Untitled

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