Advertisement
Guest User

Agatha Simple Chaser v1.00

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