Advertisement
NotADeveloper

Canyon Climber

Apr 2nd, 2017
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. // Script Name: CanyonClimber
  2. // Author: Landrew 04-2-2017
  3. // Donations sent to Landrew
  4.  
  5. var BetSizeIsBankrollDividedBy=400;
  6. var CashoutPercentage=121;
  7. var CashoutPercentageBase = CashoutPercentage;
  8. var BitMultiplierBase=3.2;
  9. var BitMultiplierOffset;
  10. var QuitAt=50020;
  11. var WonLast=false;
  12. var CurrentBalance;
  13. var BitsBet=0
  14. var BitsToBet;
  15. var LossCount=0;
  16. var SkipCount=0;
  17. var RoundCount=0;
  18. var BelowParCount=0
  19. var WinCount=0;
  20. var WinProfit=0;
  21. var LastCrash;
  22. var WinCountMax = 8;
  23. engine.on('game_starting', function(data) {
  24. RoundCount++
  25. if (SkipCount ==0) {
  26.  
  27. if (engine.lastGamePlay() == 'LOST') {
  28.  
  29. if (LossCount==0) {
  30. CashoutPercentage=CashoutPercentageBase; BitsToBet=Math.floor((engine.getBalance()/100)/BetSizeIsBankrollDividedBy)+1;
  31.  
  32. CashoutPercentage+=22;
  33.  
  34. }
  35.  
  36. BitsToBet*=(BitMultiplierBase+BitMultiplierOffset);
  37. BitMultiplierOffset+=0.1;
  38. CashoutPercentage+=2;
  39. BitsBet+=BitsToBet;
  40.  
  41.  
  42.  
  43.  
  44. LossCount++;
  45. WinCount=0;
  46. WonLast=false;
  47.  
  48.  
  49. } else {
  50. CashoutPercentage=CashoutPercentageBase;
  51. BitsToBet=Math.floor((engine.getBalance()/100)/BetSizeIsBankrollDividedBy)+1;
  52. BitsToBet+=WinCount*2;
  53.  
  54.  
  55. BitMultiplierOffset=0;
  56. WonLast=true;
  57. LossCount=0;
  58. BetSizeIsBankrollDividedBy+=1;
  59. WinCount++;
  60. BitsBet=BitsToBet;
  61. if (WinCount > WinCountMax) {
  62. SkipCount=Math.floor(WinCount/2);
  63. WinCount=0;
  64. }
  65. }
  66.  
  67. CurrentBalance=engine.getBalance();
  68. if (WonLast) console.log('%cWin Profit: ' + WinProfit, 'color: purple; font-size: 20px');
  69. console.log('Balance: ', CurrentBalance/100);
  70. console.log('%cCashout: '+ CashoutPercentage, 'color: blue; font-size:15px');
  71. console.log('%cBits Bet: '+ BitsToBet, 'color:red; font-size:20px');
  72. console.log('X factor: ', BitMultiplierBase+BitMultiplierOffset);
  73. console.log('%cLoss Count: ' + LossCount, 'color:red; font-size:14px');
  74. console.log('Divide By: ', BetSizeIsBankrollDividedBy);
  75. console.log('X Offset: ', BitMultiplierOffset);
  76. console.log('%cTotal Bits Bet: '+ BitsBet, 'color: green; font-size:18px');
  77. console.log('WinCount: ', WinCount);
  78. if (CurrentBalance/100 > QuitAt) {
  79. console.log('Stopping');
  80. engine.stop();
  81.  
  82. }
  83. engine.placeBet(Math.floor(BitsToBet)*100 ,Math.floor(CashoutPercentage));
  84. } else {
  85. SkipCount--;
  86. console.log('Skip Count: ', SkipCount);
  87. }
  88.  
  89. });
  90.  
  91.  
  92.  
  93.  
  94. engine.on('game_crash', function(data) {
  95. console.log('Game crashed at ', data.game_crash);
  96. LastCrash=data.game_crash;
  97.  
  98. if (data.game_crash> CashoutPercentage) {
  99. WonLast=true;
  100. WinProfit = Math.floor(engine.getBalance()/100-BitsBet-CurrentBalance/100);
  101. }
  102. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement