Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. var config = {
  2. startbetbit: { value: 100, type: 'balance', label: '베팅금액' },
  3. cashOut: { value: 2, type: 'multiplier', label: '목표배당' },
  4. matinX: { value: 2, type: 'text', label: '베팅증가(×)' },
  5. startCashOut: { value: 1.1, type: 'multiplier', label: '시작조건(<)' },
  6. startCashOut2: { value: 1.01, type: 'multiplier', label: '시작조건(>)' },
  7. checkCnt_default: { value: 2, type: 'text', label: '조건횟수' },
  8. maxBet: { value: 2, type: 'text', label: 'Reset' },
  9. targetbalance: { value: 10000, type: 'balance', label: 'Target Balance' }
  10. };
  11.  
  12. //=====================================
  13. //시작금
  14. var startbetbit = config.startbetbit.value / 100;
  15.  
  16. //목표배수
  17. var cashOut = config.cashOut.value;
  18.  
  19. //금액마틴
  20. var matinX = Number(config.matinX.value);
  21.  
  22. //시작조건
  23. var startCashOut = config.startCashOut.value;
  24.  
  25. //연패 시 스크립트 초기화
  26. var maxBet = Number(config.maxBet.value);
  27.  
  28. /* 181117 Add */
  29. //조건횟수
  30. var checkCnt_default = Number(config.checkCnt_default.value);
  31. //=====================================
  32.  
  33. var betbit = 1;
  34. var phase = 0;
  35. var countLose = 0;
  36. var winbattingmoney = 0;
  37. var isBetFinish = false;
  38. var startmoney = (userInfo.balance/100);
  39. var nowCash = 0;
  40. var betStart = false;
  41. /* 181117 Add */
  42. var checkCnt = 0;
  43.  
  44. console.clear()
  45. engine.on('GAME_STARTING', function(history) {
  46.  
  47. if(betStart == false){ //vmBet
  48. log('베팅을 대기중입니다.');
  49.  
  50. }else{
  51. betbit = Math.round(startbetbit * Math.pow(matinX, countLose));
  52. engine.bet(betbit * 100, cashOut);
  53. isBetFinish = true;
  54. }
  55.  
  56.  
  57. });
  58.  
  59.  
  60. engine.on('GAME_ENDED', function(history) {
  61.  
  62. var lastGame = engine.history.first();
  63. nowCash = history.bust;
  64. if (userInfo.balance >= config.targetbalance.value) {
  65. log('목표 자산에 도달하였습니다. 종료합니다.');
  66. stop();
  67. }
  68. if (isBetFinish) {
  69. if (lastGame.cashedAt) {
  70. countLose = 0;
  71. winbattingmoney = 0;
  72. betStart = false;
  73.  
  74.  
  75. } else if(!lastGame.cashedAt){
  76. betStart = false;
  77. countLose ++;
  78. winbattingmoney += betbit;
  79. if(countLose == maxBet)
  80. {
  81. log('정해진 베팅이 모두 패배하여 스크립트를 초기화합니다.');
  82. countLose = 0;
  83. }
  84. }else{
  85. }
  86. }
  87.  
  88. if((nowCash < startCashOut) && (nowCash > startCashOut2))
  89. {
  90. checkCnt ++;
  91. if(checkCnt == checkCnt_default)
  92. {
  93. log('다음판 베팅에 들어갑니다.');
  94. betStart = true;
  95. checkCnt = 0;
  96. }
  97. }
  98. else
  99. {
  100. checkCnt = 0;
  101. }
  102.  
  103. isBetFinish = false;
  104. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement