Advertisement
NotADeveloper

Drunken Martingale Script

Mar 22nd, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 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 = 12;
  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.  
  38. BitsToBet*=1.5;
  39. CashoutPercentage+=10;
  40. }
  41. CashoutPercentage+=LossCount;
  42. BitsToRecover+=BitsToBet;
  43. BitsToBet*=0.8;
  44. LossCount++;
  45. WinCount=0;
  46.  
  47.  
  48. }
  49. // Last round was a win - derive base bet plus loss recovery portion.
  50. else {
  51. if (WinCount ==0) {
  52. CashoutPercentage=CashoutPercentageBase;
  53. } else {
  54. CashoutPercentage+=0.5;
  55. }
  56.  
  57. BitsToBetBase = Math.floor(((engine.getBalance()/100)-BitsToRecover)/BetSizeIsBankrollDividedBy);
  58.  
  59. BitsToBet=BitsToBetBase;
  60.  
  61.  
  62.  
  63. LossRecoveryTemp = BitsToRecover*0.15;
  64. BitsToBet+=LossRecoveryTemp*1.1;
  65. BitsToRecover-=LossRecoveryTemp*0.85;
  66. if (BitsToRecover < 0) BitsToRecover = 0;
  67.  
  68. WinCount++;
  69. LossCount=0;
  70. }
  71.  
  72. if (NyanChaseCounter >0) {
  73. console.log('%cN'+'%cY'+'%cA'+'%cN', 'color:red', 'color:blue', 'color:yellow', 'color:green');
  74. } else {
  75. console.log(' ');
  76. console.log('Bits Bet: ', BitsToBet);
  77. console.log('Cashout: ', CashoutPercentage);
  78. console.log('WinCount: ', WinCount);
  79. console.log('LossCount: ', LossCount);
  80. console.log('Skip Bet: ', SkipBet);
  81. console.log('Last Crash: ', LastCrash);
  82. console.log('Divide BR by: ',BetSizeIsBankrollDividedBy);
  83. console.log('Bits To Recover: ',BitsToRecover);
  84. }
  85. if (!SkipBet) {
  86. engine.placeBet(Math.floor(BitsToBet)*100 ,Math.floor(CashoutPercentage ));
  87. }
  88.  
  89. });
  90. engine.on('game_crash', function(data) {
  91. LastCrash=data.game_crash/100;
  92. if (SkipBet) {
  93. if (LastCrash*100 < SkipBetReleasePercentage) {
  94. SkipBet=false;
  95. WinCount=0;
  96. LossCount=0;
  97. BitsToBet=BitsToBetBase;
  98. }
  99. }
  100. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement