Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.32 KB | None | 0 0
  1. // Settings
  2. var GameMode = 1; // Sets the bet mode
  3. var BaseBet = 1; // 1 = 1 mxrp Exact Values
  4. var Multiplier = 1.50; //Default: 1.50 Sets the auto cash out X
  5. var MaxBet = 1000; //Default: 1000000 The bot will never bet more than this amount (in bits).
  6. var MaxProfit = 100000; //Default: 100000 The bot will stop when your total balance is higher that this value (in bits).
  7. var MaxLoss = 25000; //Default: 25000 You will never lose more than this amount (in bits). If a bet would exceed this amount, the bot stops automatically.
  8. var RandomBreak = 0; //Default: 0 Before the bot places a bet it generates a random number between 0 and 100, if that number is lower than "RandomBreak" the bot will take a break for 1 game. (This will not happen on a loss streak )
  9. var MaxProfitMode = false; //Default: true If this setting is true, you will always bet ("PercentOfTotal" / 100 * your balance), if this setting is false you will just bet your BaseBet.
  10. var PercentOfTotal = 0.1; //Default: 1 If MaxProfitMode is true, your BaseBet will always be ("PercentOfTotal" / 100 * your balance). Default 0.1% of your total balance.
  11.  
  12. // core
  13. var Username = engine.getUsername();
  14. var StartBalance = engine.getBalance();
  15. var CurrentGameID = -1;
  16. var FirstGame = true;
  17. var CurrentBet = BaseBet;
  18. var StartBet = BaseBet;
  19. var bet = BaseBet;
  20. var CurrentMultiplier = Multiplier;
  21. var d = new Date();
  22. var StartTime = d.getTime();
  23. var LastResult = "WON";
  24. var Break = false;
  25. var LastBet = 0;
  26. var LastProfit = 0;
  27. var NewProfit = 0;
  28. var WinStreak = 1;
  29. var LoseStreak = 1;
  30. var Unit = 1;
  31. var SessionProfit = 0;
  32. var MaxSessionProfit = Multiplier - 1;
  33. //var enableBetting = true;
  34.  
  35. if(GameMode == 1){
  36. if (confirm("Mode 1.08 / 1.25 Cashout, 4x/5x/5x Loss Streak Bet Increase Press OK to Continue") == true) {
  37. // OK to continue with the script.
  38. console.log('HolyGrail Initiated');
  39. } else {
  40. // Script Stopped.
  41. console.log('Script Stopped');
  42. engine.stop();
  43. }
  44. }
  45.  
  46. // start message
  47. console.log('Ayy ' + Username);
  48. console.log('Your Starting Balance: ' + (StartBalance / 100).toFixed(2) + ' Coins');
  49.  
  50. if(GameMode < 1 || GameMode > 4){
  51. console.log('Select a game mode between 1 and 4.');
  52. engine.stop();
  53. }
  54.  
  55.  
  56. // Start of a game.
  57. engine.on('game_starting', function(info) {
  58. CurrentGameID = info.game_id;
  59. console.log('---------------------');
  60. console.log('Game #' + CurrentGameID + ' Started.');
  61.  
  62. var random = randomNumber(1,100);
  63.  
  64. if(random < RandomBreak){
  65. console.log("Taking a break this round.");
  66. Break = true;
  67. }
  68.  
  69. if(Break == false){
  70.  
  71. if(MaxProfitMode == true){
  72. BaseBet = Math.round((PercentOfTotal / 100) * (engine.getBalance() / 100).toFixed(2));
  73. }
  74.  
  75. if (engine.lastGamePlay() == "LOST" && !FirstGame) { // Check if you lost the last game
  76. if(GameMode == 1){// Main Bets
  77. //CurrentBet = (CurrentBet * 4);
  78. CurrentMultiplier = 1.25;
  79. if(LoseStreak == 1){
  80. CurrentBet = LastBet * 4;
  81. }
  82. if(LoseStreak == 2){
  83. CurrentBet = LastBet * 5;
  84. }
  85. if(LoseStreak == 3){
  86. CurrentBet = LastBet * 5;
  87. }
  88. if(LoseStreak == 4){
  89. CurrentBet = LastBet * 5;
  90. }
  91. console.log('Loss Streak: ' + LoseStreak);
  92. LoseStreak++;
  93. }
  94.  
  95.  
  96. //if(GameMode == 2){// new game
  97.  
  98. //}
  99.  
  100. }
  101. else { // If won last game or first game
  102.  
  103. if(GameMode == 1){// Main Bets
  104. CurrentBet = BaseBet;
  105. CurrentMultiplier = 1.08;
  106. console.log('Win Streak:' + WinStreak);
  107. WinStreak++;
  108. }
  109. //if(GameMode == 2){// new game
  110.  
  111. //}
  112. }
  113.  
  114. //check if current bet is 0 or negative
  115. if(CurrentBet < 1){
  116. CurrentBet = 1;
  117. }
  118.  
  119. //Controls Loss Streak Reset.
  120. if(WinStreak == 1){
  121. LoseStreak = 1;
  122. }
  123.  
  124. //Controls Loss Streak.
  125. if(LoseStreak == 2){
  126. WinStreak = 0;
  127. }
  128.  
  129. //Controls Win Streak Reset.
  130. if(LoseStreak == 4){
  131. LoseStreak = 1;
  132. WinStreak++;
  133. }
  134.  
  135. // First game is set to false.
  136. FirstGame = false;
  137. // Changing last result
  138. LastResult = "LOST";
  139. if(((engine.getBalance() / 100) - CurrentBet) < ((StartBalance / 100) - MaxLoss)){
  140. console.log('This bet would Exceed Your maximum loss, the bot will stop now... ');
  141. engine.stop();
  142. }else{
  143. if (CurrentBet <= engine.getBalance()) { // Check if the balance is high enough to place the bet.
  144. if (CurrentBet > (MaxBet)) { // Check if the bet is higher than the given maximum bet by the user.
  145. console.warn('Current bet exceeds your maximum bet. Your bet is changed to: ' + (MaxBet) + ' Coins');
  146. CurrentBet = MaxBet;
  147. }
  148. console.log('BET: ' + (CurrentBet) + ' Coins @ ' + CurrentMultiplier + 'x');
  149. engine.placeBet(CurrentBet * 100, Math.round(CurrentMultiplier * 100), false);
  150. LastBet = CurrentBet;
  151. LastProfit = (CurrentBet * CurrentMultiplier) - CurrentBet;
  152. }
  153. else { // Not enough balance to place the bet.
  154. if (engine.getBalance() < 100) { // Stop the bot if balance is less then 100 bits.
  155. console.error('Your account balance is too low too place a bet.... bot will close now.');
  156. engine.stop();
  157. }
  158. else { // Changes basebet to 1 if balance is to low to make the current bet.
  159. console.warn('Your balance is too low too bet: ' + (CurrentBet / 100) + ' Coins.');
  160. CurrentBet = BaseBet;
  161. }
  162. }
  163. }
  164. }
  165. });
  166.  
  167.  
  168.  
  169.  
  170. engine.on('cashed_out', function(data) {
  171. if (data.username == engine.getUsername()) {
  172. console.log('CASHED OUT @ ' + (data.stopped_at / 100) + 'x');
  173. SessionProfit = SessionProfit + (Unit * MaxSessionProfit);
  174. if(((engine.getBalance() - StartBalance) / 100).toFixed(2) > MaxProfit){
  175. console.log('Maximum profit reached, bot is shutting down...');
  176. console.log('You have made '+((engine.getBalance() - StartBalance) / 100).toFixed(2)+' Profit This Session.');
  177. engine.stop();
  178. }
  179. LastResult = "WON";
  180. }
  181. });
  182.  
  183. engine.on('game_crash', function(data) {
  184. var newdate = new Date();
  185. var timeplaying = ((newdate.getTime() - StartTime) / 1000) / 60;
  186. if(Break == false){
  187. console.log('Game Crashed at ' + (data.game_crash / 100) + 'x');
  188. console.log('Session Profit: ' + ((engine.getBalance() - StartBalance) / 100).toFixed(2) + ' Coins in ' + Math.round(timeplaying) + ' Minutes.');
  189. } else{
  190. Break = false;
  191. }
  192. });
  193.  
  194. function randomNumber(min,max)
  195. {
  196. return Math.floor(Math.random()*(max-min+1)+min);
  197. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement