Advertisement
Guest User

Untitled

a guest
Dec 28th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.67 KB | None | 0 0
  1. var config = {
  2. header1: { type: 'noop', label: '-- First Values Below --' },
  3. firstbaseBet: { value: 10000, type: 'balance', label: 'First Base Bet' },
  4. firstcrashTarget: { value: 2, type: 'multiplier', label: 'First Cash Out' },
  5. firstmultiOnloss: { value: 2, type: 'multiplier', label: 'First Increase Bet on Loss' },
  6. firstplayafterXgames: { value: 2, type: 'multiplier', label: 'First Play after games under Xgames Multiplier' },
  7. firstunderXgames: { value: 2, type: 'multiplier', label: 'First Xgames Multiplier' },
  8. header2: { type: 'noop', label: '-- Second Values Below --' },
  9. secondbaseBet: { value: 5000, type: 'balance', label: 'Second Base Bet' },
  10. secondcrashTarget: { value: 5, type: 'multiplier', label: 'Second Cash Out' },
  11. secondmultiOnloss: { value: 1.3, type: 'multiplier', label: 'Second Increase Bet on Loss' },
  12. secondplayafterXgames: { value: 5, type: 'multiplier', label: 'Second Play after games under Xgames Multiplier' },
  13. secondunderXgames: { value: 5, type: 'multiplier', label: 'Second Xgames Multiplier' },
  14. header3: { type: 'noop', label: '-- Third Values Below --' },
  15. thirdbaseBet: { value: 2500, type: 'balance', label: 'Third Base Bet' },
  16. thirdcrashTarget: { value: 10, type: 'multiplier', label: 'Third Cash Out' },
  17. thirdmultiOnloss: { value: 1.11, type: 'multiplier', label: 'Third Increase Bet on Loss' },
  18. thirdplayafterXgames: { value: 10, type: 'multiplier', label: 'Third Play after games under Xgames Multiplier' },
  19. thirdunderXgames: { value: 10, type: 'multiplier', label: 'Third Xgames Multiplier' },
  20. header4: { type: 'noop', label: '-- Fourth Values Below --' },
  21. fourthbaseBet: { value: 1000, type: 'balance', label: 'Fourth Base Bet' },
  22. fourthcrashTarget: { value: 20, type: 'multiplier', label: 'Fourth Cash Out' },
  23. fourthmultiOnloss: { value: 1.05, type: 'multiplier', label: 'Fourth Increase Bet on Loss' },
  24. fourthplayafterXgames: { value: 20, type: 'multiplier', label: 'Fourth Play after games under Xgames Multiplier' },
  25. fourthunderXgames: { value: 20, type: 'multiplier', label: 'Fourth Xgames Multiplier' },
  26. header5: { type: 'noop', label: '-- Fifth Values Below --' },
  27. fifthbaseBet: { value: 500, type: 'balance', label: 'Fifth Base Bet' },
  28. fifthcrashTarget: { value: 50, type: 'multiplier', label: 'Fifth Cash Out' },
  29. fifthmultiOnloss: { value: 1.022, type: 'multiplier', label: 'Fifth Increase Bet on Loss' },
  30. fifthplayafterXgames: { value: 50, type: 'multiplier', label: 'Fifth Play after games under Xgames Multiplier' },
  31. fifthunderXgames: { value: 50, type: 'multiplier', label: 'Fifth Xgames Multiplier' },
  32. };
  33.  
  34. log ( 'Script is running...' );
  35.  
  36. //Game Variables
  37. let firstcurrentBet;
  38. let secondcurrentBet;
  39. let thirdcurrentBet;
  40. let fourthcurrentBet;
  41. let fifthcurrentBet;
  42. let firstXgames = 0;
  43. let secondXgames = 0;
  44. let thirdXgames = 0;
  45. let fourthXgames = 0;
  46. let fifthXgames = 0;
  47. let beginfirst;
  48. let beginsecond;
  49. let beginthird;
  50. let beginfourth;
  51. let beginfifth;
  52.  
  53.  
  54. //Events to follow
  55. engine.on('GAME_STARTING', ongamestart);
  56. engine.on('GAME_ENDED', ongameend);
  57.  
  58. //Game Starting Event
  59. function ongamestart() {
  60. if (beginfirst) {
  61. engine.bet(roundBit(firstcurrentBet), config.firstcrashTarget.value);
  62. log(currentBet);
  63. } else if (beginsecond) {
  64. engine.bet(roundBit(secondcurrentBet), config.secondcrashTarget.value);
  65. } else if (beginthird) {
  66. engine.bet(roundBit(thirdcurrentBet), config.thirdcrashTarget.value);
  67. } else if (beginfourth) {
  68. engine.bet(roundBit(fourthcurrentBet), config.fourthcrashTarget.value);
  69. } else if (beginfifth) {
  70. engine.bet(roundBit(fifthcurrentBet), config.fifthcrashTarget.value);
  71. } else {
  72. return;
  73. }
  74. }
  75.  
  76. //Game Ending Event
  77. function ongameend() {
  78. var lastGame = engine.history.first()
  79.  
  80. // Xgames counter
  81. if (lastGame.bust < config.firstunderXgames.value) {
  82. firstXgames++;
  83. }else{
  84. firstXgames = 0;
  85. }
  86.  
  87. // Did we bet last round?
  88. if (lastGame.wager){
  89. //We Won
  90. if(lastGame.cashedAt){
  91. firstcurrentBet = 0;
  92. }else{
  93. firstcurrentBet *= config.firstmultiOnloss.value;
  94. beginfirst = true;
  95. }
  96. }else{
  97. //We Didn't Bet
  98. if(firstXgames >= config.firstplayafterXgames.value){
  99. firstcurrentBet = config.firstbaseBet.value;
  100. log (firstcurrentBet);
  101. log ( 'First X Games target of', config.firstplayafterXgames.value, 'has been met. Next round we will bet if no lower multipliers are due.');
  102. beginfirst = true;
  103. }else{
  104. firstcurrentBet = 0;
  105. log ( 'First X Games count', firstXgames );
  106. beginfirst = false;
  107. }
  108. }
  109.  
  110.  
  111. ///////////////////////////////////////////////////
  112.  
  113.  
  114. // Xgames counter
  115. if (lastGame.bust < config.secondunderXgames.value) {
  116. secondXgames++;
  117. }else{
  118. secondXgames = 0;
  119. }
  120.  
  121. // Did we bet last round?
  122. if (lastGame.wager){
  123. //We Won
  124. if(lastGame.cashedAt){
  125. secondcurrentBet = 0;
  126. }else{
  127. secondcurrentBet *= config.secondmultiOnloss.value;
  128. beginsecond = true;
  129. }
  130. }else{
  131. //We Didn't Bet
  132. if( secondXgames >= config.secondplayafterXgames.value){
  133. secondcurrentBet = config.secondbaseBet.value;
  134. log ( 'Second X Games target of', config.secondplayafterXgames.value, 'has been met. Next round we will bet if no lower multipliers are due.');
  135. beginsecond = true;
  136. }else{
  137. secondcurrentBet = 0;
  138. log ( 'Second X Games count', secondXgames );
  139. beginsecond = false;
  140. }
  141. }
  142.  
  143. /////////////////////////////////////////////////////////
  144.  
  145.  
  146. // Xgames counter
  147. if (lastGame.bust < config.thirdunderXgames.value) {
  148. thirdXgames++;
  149. }else{
  150. thirdXgames = 0;
  151. }
  152.  
  153. // Did we bet last round?
  154. if (lastGame.wager){
  155. //We Won
  156. if(lastGame.cashedAt){
  157. thirdcurrentBet = 0;
  158. }else{
  159. thirdcurrentBet *= config.thirdmultiOnloss.value;
  160. beginthird = true;
  161.  
  162. }
  163. }else{
  164. //We Didn't Bet
  165. if( thirdXgames >= config.thirdplayafterXgames.value){
  166. thirdcurrentBet = config.thirdbaseBet.value;
  167. log ( 'Third X Games target of', config.thirdplayafterXgames.value, 'has been met. Next round we will bet if no lower multipliers are due.');
  168. beginthird = true;
  169. }else{
  170. thirdcurrentBet = 0;
  171. log ( 'Third X Games count', thirdXgames );
  172. beginthird = false;
  173. }
  174. }
  175.  
  176. ///////////////////////////////////////////////
  177.  
  178.  
  179.  
  180. // Xgames counter
  181. if (lastGame.bust < config.fourthunderXgames.value) {
  182. fourthXgames++;
  183. }else{
  184. fourthXgames = 0;
  185. }
  186.  
  187. // Did we bet last round?
  188. if (lastGame.wager){
  189. //We Won
  190. if(lastGame.cashedAt){
  191. fourthcurrentBet = 0;
  192. }else{
  193. fourthcurrentBet *= config.fourthmultiOnloss.value;
  194. beginfourth = true;
  195. }
  196. }else{
  197. //We Didn't Bet
  198. if( fourthXgames >= config.fourthplayafterXgames.value){
  199. fourthcurrentBet = config.fourthbaseBet.value;
  200. log ( 'Fourth X Games target of', config.fourthplayafterXgames.value, 'has been met. Next round we will bet if no lower multipliers are due.');
  201. beginfourth = true;
  202. }else{
  203. fourthcurrentBet = 0;
  204. log ( 'Fourth X Games count', fourthXgames );
  205. beginfourth = false;
  206. }
  207. }
  208.  
  209.  
  210.  
  211. ///////////////////////////////////////////////////////
  212.  
  213. // Xgames counter
  214. if (lastGame.bust < config.fifthunderXgames.value) {
  215. fifthXgames++;
  216. }else{
  217. fifthXgames = 0;
  218. }
  219.  
  220. // Did we bet last round?
  221. if (lastGame.wager){
  222. //We Won
  223. if(lastGame.cashedAt){
  224. fifthcurrentBet = 0;
  225. }else{
  226. fifthcurrentBet *= config.fifthmultiOnloss.value;
  227. beginfifth = true;
  228. }
  229. }else{
  230. //We Didn't Bet
  231. if( fifthXgames >= config.fifthplayafterXgames.value){
  232. fifthcurrentBet = config.fifthbaseBet.value;
  233. log ( 'Fifth X Games target of', config.fifthplayafterXgames.value, 'has been met. Next round we will bet if no lower multipliers are due.');
  234. beginfifth = true;
  235. }else{
  236. fifthcurrentBet = 0;
  237. log ( 'Fifth X Games count', fifthXgames );
  238. beginfifth = false;
  239. }
  240. }
  241.  
  242. }
  243.  
  244. //Math Rounding Function
  245. function roundBit(bet){
  246. return Math.round(bet / 100)*100;
  247. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement