Advertisement
Guest User

Untitled

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