Advertisement
Guest User

Untitled

a guest
Dec 29th, 2018
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.91 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.  
  77.  
  78. //Game Ending Event
  79. function ongameend() {
  80. var lastGame = engine.history.first()
  81.  
  82. /////////////////////////////////
  83.  
  84. // Xgames counter
  85. if (lastGame.bust < config.firstunderXgames.value) {
  86. firstXgames++;
  87. }else{
  88. firstXgames = 0;
  89. }
  90.  
  91.  
  92. // Xgames counter
  93. if (lastGame.bust < config.secondunderXgames.value) {
  94. secondXgames++;
  95. }else{
  96. secondXgames = 0;
  97. }
  98.  
  99. // Xgames counter
  100. if (lastGame.bust < config.thirdunderXgames.value) {
  101. thirdXgames++;
  102. }else{
  103. thirdXgames = 0;
  104. }
  105.  
  106. // Xgames counter
  107. if (lastGame.bust < config.fourthunderXgames.value) {
  108. fourthXgames++;
  109. }else{
  110. fourthXgames = 0;
  111. }
  112.  
  113.  
  114. // Xgames counter
  115. if (lastGame.bust < config.fifthunderXgames.value) {
  116. fifthXgames++;
  117. }else{
  118. fifthXgames = 0;
  119. }
  120.  
  121. ////////////////////////////
  122. if (beginfirst === true) {
  123. // Did we bet last round?
  124. if (lastGame.wager){
  125. //We Won
  126. if(lastGame.cashedAt){
  127. firstcurrentBet = 0;
  128. }else{
  129. firstcurrentBet *= config.firstmultiOnloss.value;
  130. beginfirst = true;
  131. }
  132. }else{
  133. //We Didn't Bet
  134. if(firstXgames >= config.firstplayafterXgames.value){
  135. firstcurrentBet = config.firstbaseBet.value;
  136. log (firstcurrentBet);
  137. log ( 'First X Games target of', config.firstplayafterXgames.value, 'has been met. Next round we will bet if no lower multipliers are due.');
  138. beginfirst = true;
  139. }else{
  140. firstcurrentBet = 0;
  141. log ( 'First X Games count', firstXgames );
  142. beginfirst = false;
  143. }
  144. }
  145.  
  146. } else if (beginsecond === true) {
  147. ///////////////////////////////////////////////////
  148.  
  149.  
  150.  
  151. // Did we bet last round?
  152. if (lastGame.wager){
  153. //We Won
  154. if(lastGame.cashedAt){
  155. secondcurrentBet = 0;
  156. }else{
  157. secondcurrentBet *= config.secondmultiOnloss.value;
  158. beginsecond = true;
  159. }
  160. }else{
  161. //We Didn't Bet
  162. if( secondXgames >= config.secondplayafterXgames.value){
  163. secondcurrentBet = config.secondbaseBet.value;
  164. log ( 'Second X Games target of', config.secondplayafterXgames.value, 'has been met. Next round we will bet if no lower multipliers are due.');
  165. beginsecond = true;
  166. }else{
  167. secondcurrentBet = 0;
  168. log ( 'Second X Games count', secondXgames );
  169. beginsecond = false;
  170. }
  171. }
  172. } else if (beginthird === true) {
  173. /////////////////////////////////////////////////////////
  174.  
  175.  
  176.  
  177.  
  178. // Did we bet last round?
  179. if (lastGame.wager){
  180. //We Won
  181. if(lastGame.cashedAt){
  182. thirdcurrentBet = 0;
  183. }else{
  184. thirdcurrentBet *= config.thirdmultiOnloss.value;
  185. beginthird = true;
  186.  
  187. }
  188. }else{
  189. //We Didn't Bet
  190. if( thirdXgames >= config.thirdplayafterXgames.value){
  191. thirdcurrentBet = config.thirdbaseBet.value;
  192. log ( 'Third X Games target of', config.thirdplayafterXgames.value, 'has been met. Next round we will bet if no lower multipliers are due.');
  193. beginthird = true;
  194. }else{
  195. thirdcurrentBet = 0;
  196. log ( 'Third X Games count', thirdXgames );
  197. beginthird = false;
  198. }
  199. }
  200. } else if (beginfourth === true) {
  201. ///////////////////////////////////////////////
  202.  
  203.  
  204.  
  205.  
  206. // Did we bet last round?
  207. if (lastGame.wager){
  208. //We Won
  209. if(lastGame.cashedAt){
  210. fourthcurrentBet = 0;
  211. }else{
  212. fourthcurrentBet *= config.fourthmultiOnloss.value;
  213. beginfourth = true;
  214. }
  215. }else{
  216. //We Didn't Bet
  217. if( fourthXgames >= config.fourthplayafterXgames.value){
  218. fourthcurrentBet = config.fourthbaseBet.value;
  219. log ( 'Fourth X Games target of', config.fourthplayafterXgames.value, 'has been met. Next round we will bet if no lower multipliers are due.');
  220. beginfourth = true;
  221. }else{
  222. fourthcurrentBet = 0;
  223. log ( 'Fourth X Games count', fourthXgames );
  224. beginfourth = false;
  225. }
  226. }
  227.  
  228.  
  229. } else if (beginfifth) {
  230. ///////////////////////////////////////////////////////
  231.  
  232.  
  233.  
  234. // Did we bet last round?
  235. if (lastGame.wager){
  236. //We Won
  237. if(lastGame.cashedAt){
  238. fifthcurrentBet = 0;
  239. }else{
  240. fifthcurrentBet *= config.fifthmultiOnloss.value;
  241. beginfifth = true;
  242. }
  243. }else{
  244. //We Didn't Bet
  245. if( fifthXgames >= config.fifthplayafterXgames.value){
  246. fifthcurrentBet = config.fifthbaseBet.value;
  247. log ( 'Fifth X Games target of', config.fifthplayafterXgames.value, 'has been met. Next round we will bet if no lower multipliers are due.');
  248. beginfifth = true;
  249. }else{
  250. fifthcurrentBet = 0;
  251. log ( 'Fifth X Games count', fifthXgames );
  252. beginfifth = false;
  253. }
  254. }
  255.  
  256. }
  257. }
  258. //Math Rounding Function
  259. function roundBit(bet){
  260. return Math.round(bet / 100)*100;
  261. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement