Advertisement
Nubs27

Fargo 17

Oct 19th, 2019
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Donations accepted in many coin/token types. List & Addresses:
  2. // https://sites.google.com/view/nanogamescrashscripts/home/donation-addresses
  3.  
  4.  
  5. var config = {
  6.     mainTitle: { label: '*** Fargo 17; Adapted by Nubs27 ***', type: 'title' },
  7.     bet: { label: 'Base Bet', value: 0.0001, type: 'number' },
  8. };
  9.  
  10. function main () {
  11. var bet = config.bet.value;
  12. var cashOut = 1.6;
  13.  
  14. var skip1 = 0;    // after 3rd loss
  15. var skip2 = 0;    // after 4th loss
  16. var skip3 = 0;    // after 5th loss
  17. var skip4 = 0;    // after 6th loss
  18. var skip5 = 0;    // after 7th loss
  19. var skip6 = 0;    // after 8th loss
  20. var skip7 = 0;    // after 9th loss
  21.  
  22. var currentBet = bet;
  23. var losses = 0;
  24. var skip = 0;
  25. var lostGames = 0;
  26. var waitXgames = 0;
  27. var winStreak = 0;
  28. var lossStreak = 0;
  29. var lastResult = 'WON';
  30. var lastGame = History[0];
  31. console.log('%c----------Start!----------', 'color: green; font-weight:bold');
  32. log.info('----------Start!----------', 'color: green; font-weight:bold');
  33. engine.on('GAME_STARTING', function () {
  34.     if (lastResult == 'LOST') {
  35.         currentBet = (currentBet * 1.49); //bet increase on loss
  36.         cashOut = (losses / currentBet) + 1.04; //cashout multiplier increase on loss
  37.         if (lostGames >= 1) {
  38.             waitXgames = 0;
  39.             if (lostGames == 3) {skip = skip1;}
  40.             if (lostGames == 4) {skip = skip2;}
  41.             if (lostGames == 5) {skip = skip3;}
  42.             if (lostGames == 6) {skip = skip4;}
  43.             if (lostGames == 7) {skip = skip5;}
  44.             if (lostGames == 8) {skip = skip6;}
  45.             if (lostGames >= 9) {skip = skip7;}
  46.         }
  47.         console.log('Lost Section - Current Bet = ' + currentBet + ' PayOut = ' + cashOut);
  48.     }
  49.     if (lastResult == 'WON') {
  50.         cashOut = 1.6;
  51.         //if win
  52.         if (winStreak >= 2) {
  53.             currentBet = currentBet * 1.10; //bet increase on win
  54.             cashOut = cashOut + 0.01; //cashout increase on win
  55.         }else{
  56.             console.log('%cBetting Reset', 'color: green; font-weight:bold');
  57.             log.info('Betting Reset');
  58.             currentBet = bet; //reset betting on win
  59.             cashOut = 1.2;
  60.         }
  61.         lostGames = 0;    
  62.         skip = 0;
  63.         cashOut = 1.6;
  64.         //reset betting on 10 winStreak
  65.         if (winStreak == 7) {
  66.             console.log('%c7 wins', 'color: green; font-weight:bold');
  67.             log.info('7 wins');
  68.             console.log('%cBetting Reset', 'color: green; font-weight:bold');
  69.             log.info('Betting Reset');
  70.             currentBet = bet; //reset bet
  71.             cashOut = 1.2; //reset the cashout
  72.         }
  73.     }
  74.     if (waitXgames >= skip) {
  75.         if (lastResult == 'WON') {
  76.             console.log('%cYou win', 'color: green; font-weight:bold');
  77.             log.info('You Won');
  78.         }
  79.         if (lastResult == 'LOST') {
  80.             console.log('%cYou lose', 'color: red; font-weight:bold');
  81.             log.info('You Lost');
  82.         }
  83.         if (winStreak > 1) {
  84.             console.log('Current win streak is' + winStreak);
  85.             log.info('Current win streak is' + winStreak);
  86.         }
  87.         if (lossStreak > 1) {
  88.             console.log('Current loss streak is' + lossStreak);
  89.             log.info('Current loss streak is' + lossStreak);
  90.         }
  91.         console.log('--------New Round--------');
  92.         log.info('--------New Round--------');
  93.         console.log('', currentBet, currency.currencyName, 'bet at', Math.round(cashOut * 100) / 100, 'x');
  94.         engine.bet(Math.floor(currentBet), Math.round(cashOut * 100) / 100);
  95.     }else{
  96.         console.log('--------New Round--------');
  97.         log.info('--------New Round--------');
  98.         console.log('Cooling off. No bets this round.');
  99.         log.info('Cooling off. No bets this round.');
  100.         console.log('Current loss streak is', lossStreak);
  101.         log.info('Current loss streak is', lossStreak);
  102.         winStreak = 0;
  103.     }
  104. });
  105.  
  106. //Crash Occurred
  107. engine.on('GAME_ENDED', function (data) {
  108.     var History = engine.getHistory();
  109.     lastGame = History[0];
  110.     if (History[0] / 100 >= cashOut) {
  111.         console.log('Game [Busted] at ' + (History[0] / 100) + 'x');
  112.         waitXgames++;
  113.     }else{
  114.         waitXgames++;
  115.     }
  116.     if (lastGame.cashedAt) {
  117.         lastResult = 'WON';
  118.         lossStreak = 0;
  119.         winStreak++;
  120.     }else{
  121.         lastResult = 'LOST';
  122.         winStreak = 0;
  123.         lossStreak++;
  124.         lostGames++;
  125.         losses = losses + currentBet;
  126.     }
  127. });
  128. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement