Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Script Name: Drunken Martingale
- // Author: Lander 03-22-2017
- // https://www.youtube.com/watch?v=XlUjryOP3LE
- // User Defined variables
- var BetSizeIsBankrollDividedBy = 20;
- var BetSizeIsBankrollDividedByBase = BetSizeIsBankrollDividedBy;
- var CashoutPercentage = 112;
- // Internal use
- var CashoutPercentageBase = CashoutPercentage;
- var BitsToBet=0;
- var BitsToBetBase; //BitsToBet;
- var LossCount =1; // forces aggressive first bet for win streak
- var WinCount=0;
- var LastCrash=0;
- var BitsToRecover=0;
- var SkipBet=false;
- var SkipBetReleasePercentage=110;
- var RoundCount=0;
- var NyanChaseCounter=0;
- // Round Start Evaluate last round status was it a win or loss:
- engine.on('game_starting', function(data) {
- RoundCount++;
- if (RoundCount==1) alert('If you do well with this script - please consider sending something back to the author Landrew - greatly appreciated, ask in chat for updates. Press F12 or CTRL-Shift I to see console log / stats');
- BitsToBetBase = Math.floor((engine.getBalance()/100)/BetSizeIsBankrollDividedBy);
- // Last round was a loss record loss for later recovery
- if (engine.lastGamePlay() == 'LOST') {
- if (!SkipBet) {
- if (LossCount==0) CashoutPercentage=CashoutPercentageBase;
- BitsToRecover+=BitsToBet;
- BitsToBet*=0.8;
- CashoutPercentage+=LossCount;
- LossCount++;
- WinCount=0;
- }
- }
- // Last round was a win - derive base bet plus loss recovery portion.
- else {
- if (WinCount ==0) {
- CashoutPercentage=CashoutPercentageBase;
- } else {
- CashoutPercentage++;
- }
- BitsToBetBase = Math.floor(((engine.getBalance()/100)-BitsToRecover)/BetSizeIsBankrollDividedBy);
- BitsToBet=BitsToBetBase;
- LossRecoveryTemp = BitsToRecover*0.15;
- BitsToBet+=LossRecoveryTemp*1.1;
- BitsToRecover-=LossRecoveryTemp*0.85;
- if (BitsToRecover < 0) BitsToRecover = 0;
- WinCount++;
- LossCount=0;
- }
- if (NyanChaseCounter >0) {
- console.log('%cN'+'%cY'+'%cA'+'%cN', 'color:red', 'color:blue', 'color:yellow', 'color:green');
- } else {
- console.log(' ');
- console.log('Bits Bet: ', BitsToBet);
- console.log('Cashout: ', CashoutPercentage);
- console.log('WinCount: ', WinCount);
- console.log('LossCount: ', LossCount);
- console.log('Skip Bet: ', SkipBet);
- console.log('Last Crash: ', LastCrash);
- console.log('Divide BR by: ',BetSizeIsBankrollDividedBy);
- console.log('Bits To Recover: ',BitsToRecover);
- }
- if (!SkipBet) {
- engine.placeBet(Math.floor(BitsToBet)*100 ,Math.floor(CashoutPercentage ));
- }
- });
- engine.on('game_crash', function(data) {
- LastCrash=data.game_crash/100;
- if (SkipBet) {
- if (LastCrash*100 < SkipBetReleasePercentage) {
- SkipBet=false;
- WinCount=0;
- LossCount=0;
- BitsToBet=BitsToBetBase;
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement