Advertisement
NotADeveloper

Drunken Martingale Script

Mar 22nd, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.11 KB | None | 0 0
  1. // Script Name: Drunken Martingale
  2. // Author: Lander 03-22-2017
  3. // https://www.youtube.com/watch?v=XlUjryOP3LE
  4.  
  5. // User Defined variables
  6.  
  7. var BetSizeIsBankrollDividedBy = 20;
  8. var BetSizeIsBankrollDividedByBase = BetSizeIsBankrollDividedBy;
  9. var CashoutPercentage = 112;
  10.  
  11.  
  12. // Internal use
  13. var CashoutPercentageBase = CashoutPercentage;
  14. var BitsToBet=0;
  15. var BitsToBetBase; //BitsToBet;
  16. var LossCount =1; // forces aggressive first bet for win streak
  17. var WinCount=0;
  18. var LastCrash=0;
  19. var BitsToRecover=0;
  20. var SkipBet=false;
  21. var SkipBetReleasePercentage=110;
  22. var RoundCount=0;
  23. var NyanChaseCounter=0;
  24.  
  25. // Round Start Evaluate last round status was it a win or loss:
  26.  
  27. engine.on('game_starting', function(data) {
  28. RoundCount++;
  29. 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');
  30. BitsToBetBase = Math.floor((engine.getBalance()/100)/BetSizeIsBankrollDividedBy);
  31.  
  32. // Last round was a loss record loss for later recovery
  33. if (engine.lastGamePlay() == 'LOST') {
  34.  
  35. if (!SkipBet) {
  36. if (LossCount==0) CashoutPercentage=CashoutPercentageBase;
  37. BitsToRecover+=BitsToBet;
  38. BitsToBet*=0.8;
  39.  
  40.  
  41. CashoutPercentage+=LossCount;
  42.  
  43. LossCount++;
  44. WinCount=0;
  45. }
  46.  
  47. }
  48. // Last round was a win - derive base bet plus loss recovery portion.
  49. else {
  50. if (WinCount ==0) {
  51. CashoutPercentage=CashoutPercentageBase;
  52. } else {
  53. CashoutPercentage++;
  54. }
  55.  
  56. BitsToBetBase = Math.floor(((engine.getBalance()/100)-BitsToRecover)/BetSizeIsBankrollDividedBy);
  57.  
  58. BitsToBet=BitsToBetBase;
  59.  
  60.  
  61.  
  62. LossRecoveryTemp = BitsToRecover*0.15;
  63. BitsToBet+=LossRecoveryTemp*1.1;
  64. BitsToRecover-=LossRecoveryTemp*0.85;
  65. if (BitsToRecover < 0) BitsToRecover = 0;
  66.  
  67. WinCount++;
  68. LossCount=0;
  69. }
  70.  
  71. if (NyanChaseCounter >0) {
  72. console.log('%cN'+'%cY'+'%cA'+'%cN', 'color:red', 'color:blue', 'color:yellow', 'color:green');
  73. } else {
  74. console.log(' ');
  75. console.log('Bits Bet: ', BitsToBet);
  76. console.log('Cashout: ', CashoutPercentage);
  77. console.log('WinCount: ', WinCount);
  78. console.log('LossCount: ', LossCount);
  79. console.log('Skip Bet: ', SkipBet);
  80. console.log('Last Crash: ', LastCrash);
  81. console.log('Divide BR by: ',BetSizeIsBankrollDividedBy);
  82. console.log('Bits To Recover: ',BitsToRecover);
  83. }
  84. if (!SkipBet) {
  85. engine.placeBet(Math.floor(BitsToBet)*100 ,Math.floor(CashoutPercentage ));
  86. }
  87.  
  88. });
  89. engine.on('game_crash', function(data) {
  90. LastCrash=data.game_crash/100;
  91. if (SkipBet) {
  92. if (LastCrash*100 < SkipBetReleasePercentage) {
  93. SkipBet=false;
  94. WinCount=0;
  95. LossCount=0;
  96. BitsToBet=BitsToBetBase;
  97. }
  98. }
  99. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement