Advertisement
Guest User

Untitled

a guest
Dec 27th, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 KB | None | 0 0
  1. var config = {
  2. firstbaseBet: { value: 10000, type: 'balance', label: 'First Base Bet' },
  3. firstcrashTarget: { value: 5.37, type: 'multiplier', label: 'First Cash Out' },
  4. firstmultiOnloss: { value: 1.25, type: 'multiplier', label: 'First Increase Bet on Loss' },
  5. firstplayafterXgames: { value: 10, type: 'multiplier', label: 'First Play after games under Xgames Multiplier' },
  6. firstXgames: { value: 5.37, type: 'multiplier', label: 'First Xgames Multiplier' },
  7. secondbaseBet: { value: 10000, type: 'balance', label: 'Second Base Bet' },
  8. secondcrashTarget: { value: 5.37, type: 'multiplier', label: 'Second Cash Out' },
  9. secondmultiOnloss: { value: 1.25, type: 'multiplier', label: 'Second Increase Bet on Loss' },
  10. secondplayafterXgames: { value: 10, type: 'multiplier', label: 'Second Play after games under Xgames Multiplier' },
  11. secondXgames: { value: 5.37, type: 'multiplier', label: 'Second Xgames Multiplier' },
  12. thirdbaseBet: { value: 10000, type: 'balance', label: 'Third Base Bet' },
  13. thirdcrashTarget: { value: 5.37, type: 'multiplier', label: 'Third Cash Out' },
  14. thirdmultiOnloss: { value: 1.25, type: 'multiplier', label: 'Third Increase Bet on Loss' },
  15. thirdplayafterXgames: { value: 10, type: 'multiplier', label: 'Third Play after games under Xgames Multiplier' },
  16. thirdXgames: { value: 5.37, type: 'multiplier', label: 'Third Xgames Multiplier' },
  17. fourthbaseBet: { value: 10000, type: 'balance', label: 'Fourth Base Bet' },
  18. fourthcrashTarget: { value: 5.37, type: 'multiplier', label: 'Fourth Cash Out' },
  19. fourthmultiOnloss: { value: 1.25, type: 'multiplier', label: 'Fourth Increase Bet on Loss' },
  20. fourthplayafterXgames: { value: 10, type: 'multiplier', label: 'Fourth Play after games under Xgames Multiplier' },
  21. fourthXgames: { value: 5.37, type: 'multiplier', label: 'Fourth Xgames Multiplier' },
  22. fifthbaseBet: { value: 10000, type: 'balance', label: 'Fifth Base Bet' },
  23. fifthcrashTarget: { value: 5.37, type: 'multiplier', label: 'Fifth Cash Out' },
  24. fifthmultiOnloss: { value: 1.25, type: 'multiplier', label: 'Fifth Increase Bet on Loss' },
  25. fifthplayafterXgames: { value: 10, type: 'multiplier', label: 'Fifth Play after games under Xgames Multiplier' },
  26. fifthXgames: { value: 5.37, type: 'multiplier', label: 'Fifth Xgames Multiplier' },
  27. };
  28.  
  29. log ( 'Script is running...' );
  30.  
  31. //Game Variables
  32. var currentBet = 0;
  33. var Xgames = 0;
  34.  
  35.  
  36.  
  37. //Events to follow
  38. engine.on('GAME_STARTING', ongamestart);
  39. engine.on('GAME_ENDED', ongameend);
  40.  
  41. //Game Starting Event
  42. function ongamestart() {
  43. engine.bet(roundBit(currentBet), config.crashTarget.value);
  44. }
  45.  
  46. //Game Ending Event
  47. function ongameend() {
  48. var lastGame = engine.history.first()
  49.  
  50. // Xgames counter
  51. if (lastGame.bust < config.underXgames.value) {
  52. Xgames++;
  53. }else{
  54. Xgames = 0;
  55. }
  56.  
  57. // Did we bet last round?
  58. if (lastGame.wager){
  59. //We Won
  60. if(lastGame.cashedAt){
  61. currentBet = 0;
  62. }else{
  63. return;
  64. }
  65. }else{
  66. //We Didn't Bet
  67. if( Xgames >= config.playafterXgames.value){
  68. currentBet = config.baseBet.value;
  69. log ( 'X Games target of', config.playafterXgames.value, 'has been met. Next round we will bet.');
  70. }else{
  71. currentBet = 0;
  72. log ( 'X Games count', Xgames );
  73. }
  74. }
  75. }
  76.  
  77. //Math Rounding Function
  78. function roundBit(bet){
  79. return Math.round(bet / 100)*100;
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement