Guest User

Untitled

a guest
Dec 27th, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.09 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. firstunderXgames: { 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. secondunderXgames: { 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. thirdunderXgames: { 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. fourthunderXgames: { 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. fifthunderXgames: { value: 5.37, type: 'multiplier', label: 'Fifth Xgames Multiplier' },
  27. };
  28.  
  29. log ( 'Script is running...' );
  30.  
  31. //Game Variables
  32. var firstcurrentBet = 0;
  33. var firstXgames = 0;
  34. var secondXgames = 0;
  35. var thirdXgames = 0;
  36. var fourthXgames = 0;
  37. var fifthXgames = 0;
  38.  
  39.  
  40.  
  41. //Events to follow
  42. engine.on('GAME_STARTING', ongamestart);
  43. engine.on('GAME_ENDED', ongameend);
  44.  
  45. //Game Starting Event
  46. function ongamestart() {
  47.  
  48. engine.bet(roundBit(currentBet), config.crashTarget.value);
  49. }
  50.  
  51. //Game Ending Event
  52. function ongameend() {
  53. var lastGame = engine.history.first()
  54.  
  55. // Xgames counter
  56. if (lastGame.bust < config.firstunderXgames.value) {
  57. firstXgames++;
  58. }else{
  59. firstXgames = 0;
  60. }
  61.  
  62. // Did we bet last round?
  63. if (lastGame.wager){
  64. //We Won
  65. if(lastGame.cashedAt){
  66. currentBet = 0;
  67. }else{
  68. currentBet *= config.firstmultiOnloss.value;
  69. }
  70. }else{
  71. //We Didn't Bet
  72. if( firstXgames >= config.firstplayafterXgames.value){
  73. firstcurrentBet = config.firstbaseBet.value;
  74. log ( 'X Games target of', config.firstplayafterXgames.value, 'has been met. Next round we will bet.');
  75. }else{
  76. currentBet = 0;
  77. log ( 'X Games count', firstXgames );
  78. }
  79. }
  80.  
  81.  
  82. ///////////////////////////////////////////////////
  83.  
  84.  
  85. // Xgames counter
  86. if (lastGame.bust < config.secondunderXgames.value) {
  87. secondXgames++;
  88. }else{
  89. secondXgames = 0;
  90. }
  91.  
  92. // Did we bet last round?
  93. if (lastGame.wager){
  94. //We Won
  95. if(lastGame.cashedAt){
  96. currentBet = 0;
  97. }else{
  98. currentBet *= config.secondmultiOnloss.value;
  99. }
  100. }else{
  101. //We Didn't Bet
  102. if( secondXgames >= config.secondplayafterXgames.value){
  103. currentBet = config.secondbaseBet.value;
  104. log ( 'X Games target of', config.secondplayafterXgames.value, 'has been met. Next round we will bet.');
  105. }else{
  106. currentBet = 0;
  107. log ( 'X Games count', secondXgames );
  108. }
  109. }
  110.  
  111. /////////////////////////////////////////////////////////
  112.  
  113.  
  114. // Xgames counter
  115. if (lastGame.bust < config.thirdunderXgames.value) {
  116. thirdXgames++;
  117. }else{
  118. thirdXgames = 0;
  119. }
  120.  
  121. // Did we bet last round?
  122. if (lastGame.wager){
  123. //We Won
  124. if(lastGame.cashedAt){
  125. currentBet = 0;
  126. }else{
  127. currentBet *= config.thirdmultiOnloss.value;
  128. }
  129. }else{
  130. //We Didn't Bet
  131. if( thirdXgames >= config.thirdplayafterXgames.value){
  132. currentBet = config.thirdbaseBet.value;
  133. log ( 'X Games target of', config.thirdplayafterXgames.value, 'has been met. Next round we will bet.');
  134. }else{
  135. currentBet = 0;
  136. log ( 'X Games count', thirdXgames );
  137. }
  138. }
  139.  
  140. ///////////////////////////////////////////////
  141.  
  142.  
  143.  
  144. // Xgames counter
  145. if (lastGame.bust < config.fourthunderXgames.value) {
  146. fourthXgames++;
  147. }else{
  148. fourthXgames = 0;
  149. }
  150.  
  151. // Did we bet last round?
  152. if (lastGame.wager){
  153. //We Won
  154. if(lastGame.cashedAt){
  155. currentBet = 0;
  156. }else{
  157. currentBet *= config.fourthmultiOnloss.value;
  158. }
  159. }else{
  160. //We Didn't Bet
  161. if( fourthXgames >= config.fourthplayafterXgames.value){
  162. currentBet = config.fourthbaseBet.value;
  163. log ( 'X Games target of', config.fourthplayafterXgames.value, 'has been met. Next round we will bet.');
  164. }else{
  165. currentBet = 0;
  166. log ( 'X Games count', fourthXgames );
  167. }
  168. }
  169.  
  170.  
  171.  
  172. ///////////////////////////////////////////////////////
  173.  
  174. // Xgames counter
  175. if (lastGame.bust < config.fifthunderXgames.value) {
  176. fifthXgames++;
  177. }else{
  178. fifthXgames = 0;
  179. }
  180.  
  181. // Did we bet last round?
  182. if (lastGame.wager){
  183. //We Won
  184. if(lastGame.cashedAt){
  185. currentBet = 0;
  186. }else{
  187. currentBet *= config.fifthmultiOnloss.value;
  188. }
  189. }else{
  190. //We Didn't Bet
  191. if( fifthXgames >= config.fifthplayafterXgames.value){
  192. currentBet = config.fifthbaseBet.value;
  193. log ( 'X Games target of', config.fifthplayafterXgames.value, 'has been met. Next round we will bet.');
  194. }else{
  195. currentBet = 0;
  196. log ( 'X Games count', fifthXgames );
  197. }
  198. }
  199.  
  200. }
  201.  
  202. //Math Rounding Function
  203. function roundBit(bet){
  204. return Math.round(bet / 100)*100;
  205. }
Add Comment
Please, Sign In to add comment