Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var config = {
- startbetbit: { value: 100, type: 'balance', label: '베팅금액' },
- cashOut: { value: 2, type: 'multiplier', label: '목표배당' },
- matinX: { value: 2, type: 'text', label: '베팅증가(×)' },
- startCashOut: { value: 1.1, type: 'multiplier', label: '시작조건(<)' },
- startCashOut2: { value: 1.01, type: 'multiplier', label: '시작조건(>)' },
- checkCnt_default: { value: 2, type: 'text', label: '조건횟수' },
- maxBet: { value: 2, type: 'text', label: 'Reset' },
- targetbalance: { value: 10000, type: 'balance', label: 'Target Balance' }
- };
- //=====================================
- //시작금
- var startbetbit = config.startbetbit.value / 100;
- //목표배수
- var cashOut = config.cashOut.value;
- //금액마틴
- var matinX = Number(config.matinX.value);
- //시작조건
- var startCashOut = config.startCashOut.value;
- //연패 시 스크립트 초기화
- var maxBet = Number(config.maxBet.value);
- /* 181117 Add */
- //조건횟수
- var checkCnt_default = Number(config.checkCnt_default.value);
- //=====================================
- var betbit = 1;
- var phase = 0;
- var countLose = 0;
- var winbattingmoney = 0;
- var isBetFinish = false;
- var startmoney = (userInfo.balance/100);
- var nowCash = 0;
- var betStart = false;
- /* 181117 Add */
- var checkCnt = 0;
- console.clear()
- engine.on('GAME_STARTING', function(history) {
- if(betStart == false){ //vmBet
- log('베팅을 대기중입니다.');
- }else{
- betbit = Math.round(startbetbit * Math.pow(matinX, countLose));
- engine.bet(betbit * 100, cashOut);
- isBetFinish = true;
- }
- });
- engine.on('GAME_ENDED', function(history) {
- var lastGame = engine.history.first();
- nowCash = history.bust;
- if (userInfo.balance >= config.targetbalance.value) {
- log('목표 자산에 도달하였습니다. 종료합니다.');
- stop();
- }
- if (isBetFinish) {
- if (lastGame.cashedAt) {
- countLose = 0;
- winbattingmoney = 0;
- betStart = false;
- } else if(!lastGame.cashedAt){
- betStart = false;
- countLose ++;
- winbattingmoney += betbit;
- if(countLose == maxBet)
- {
- log('정해진 베팅이 모두 패배하여 스크립트를 초기화합니다.');
- countLose = 0;
- }
- }else{
- }
- }
- if((nowCash < startCashOut) && (nowCash > startCashOut2))
- {
- checkCnt ++;
- if(checkCnt == checkCnt_default)
- {
- log('다음판 베팅에 들어갑니다.');
- betStart = true;
- checkCnt = 0;
- }
- }
- else
- {
- checkCnt = 0;
- }
- isBetFinish = false;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement