Advertisement
Guest User

Untitled

a guest
May 27th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.05 KB | None | 0 0
  1. // Script Name: Tumbling Weeds
  2. // Author: Borken 05-25-2018
  3. // Donations sent to Borken
  4.  
  5.  
  6. var DivideByFactorBase=200; // CurBal / 100 will be starting bet and default bet
  7. var DivideByLowLimit=40; // CurBal / 30 will be biggest bet.
  8. var CashoutPercentageBase=131; // 1.31x cashout (doesn't change)
  9. var CashoutMultiplier=4.5; // On Loss ethos bet multiplier
  10. var WinCountMax=5; // Stop after This many wins in a row.
  11.  
  12. // Optional control variables:
  13.  
  14. var SkipOnLoss=true; // After a loss, allow a random # of rounds to be skipped before attempting recovery.
  15. var SkipMax=2; // Randomly skip up to this many rounds before attempting recovery process.
  16.  
  17.  
  18. // Allow bet to increase in a cycle and repeat
  19.  
  20. var IncreaseBetCycling = true; // Slowly increase bet until LowLimit is hit. This is done by slowly decreasing DivideBy therefore increasing bet.
  21. var GrowthRate=1.6; // DivideBy decreases by (WinCount * GrowthRate), so it bets more and more expenontially until LowLimit is reached then resets.
  22.  
  23.  
  24. // Internal not to be set
  25.  
  26. var CashoutPercentage = CashoutPercentageBase;
  27. var DivideByFactor=DivideByFactorBase;
  28. var BitsToBet=0;
  29. var BitsToBetBase;
  30. var WinCount = 0;
  31. var CashoutOffSet=0;
  32. var LossCount=0;
  33. var Pause=false;
  34. var SkipCount = 0;
  35. var SkipStarted=false;
  36. var SkipReady=false;
  37. var MaxBet=0;
  38. engine.on('game_starting', function(data) {
  39.  
  40. BitsToBetBase= engine.getBalance()/100/DivideByFactor;
  41. MaxBet=engine.getBalance()/100/20;
  42. if (engine.lastGamePlay() == 'LOST' ) {
  43.  
  44. if (SkipOnLoss && !SkipStarted && !SkipReady) {
  45.  
  46. SkipStarted=true;
  47. SkipCount=0;
  48. console.log('ResetSkip');
  49. BitsToBet*=CashoutMultiplier;
  50. } else {
  51.  
  52.  
  53. if (SkipReady) {
  54. LossCount++;
  55. WinCount=0;
  56. BitsToBet*=CashoutMultiplier;
  57. }
  58.  
  59. }
  60. } else if (engine.lastGamePlay() == 'WON' && !Pause ) {
  61. SkipReady=false;
  62. SkipCount=0;
  63. BitsToBet=BitsToBetBase;
  64. if (BitsToBet > MaxBet) DivideByFactor=DivideByFactorBase;
  65. WinCount++;
  66. if (WinCount >= WinCountMax) Pause=true;
  67.  
  68. LossCount=0;
  69. if (IncreaseBetCycling) DivideByFactor-=(GrowthRate* WinCount);
  70. if (DivideByFactor < DivideByLowLimit) DivideByFactor=DivideByFactorBase;
  71. } else if (!Pause) {
  72.  
  73.  
  74. if (SkipStarted) SkipCount++;
  75. if (SkipCount > (Math.random()) * SkipMax) {
  76. SkipStarted=false;
  77. SkipReady=true;
  78.  
  79. }
  80. if (SkipCount ==0) BitsToBet=BitsToBetBase;
  81.  
  82. }
  83. CashoutOffSet=0;
  84.  
  85. if (!Pause && !SkipStarted) engine.placeBet(Math.floor(BitsToBet)*100 ,Math.floor(CashoutPercentage+CashoutOffSet));
  86.  
  87. console.log('WinCount: ' + WinCount);
  88. console.log('LossCount: ' + LossCount);
  89. console.log('DivideBy: ' + DivideByFactor);
  90. console.log('MaxBet: ' + MaxBet);
  91. console.log('Bits Bet: ' + BitsToBet);
  92. if (SkipOnLoss) {
  93. console.log('SkipStarted: ' + SkipStarted);
  94. console.log('SkipCount: ' + SkipCount);
  95. }
  96. console.log(' ');
  97.  
  98. });
  99.  
  100.  
  101. engine.on('game_crash', function(data) {
  102.  
  103.  
  104. if (data.game_crash <= CashoutPercentageBase-1) {
  105. Pause=false;
  106. WinCount=0;
  107. } else {
  108.  
  109.  
  110. LossCount=0;
  111. }
  112. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement