[HQ] Add auto lifing

This commit is contained in:
vilP1L
2019-08-14 19:04:20 -04:00
parent 4f78cc0e0b
commit 0e16fe08c4
3 changed files with 8 additions and 2 deletions

View File

@@ -29,6 +29,7 @@ Wilder Emu Bot + Trivia Emulator
- [X] Auto Splitting
- [X] Auto Split Enhancements (split on last q, prize qs, etc)
- [X] Auto WS Logger
- [X] Auto Lifing
- [X] HQ Trivia Erasers
### Discord Bot Commands

View File

@@ -2,7 +2,7 @@
"discord": {
"token": "NTc3OTM5NjA1NjA1ODQyOTQ2.XQa7Aw.fK9YdDKJ4gHxN21sumuYvQh_puA",
"prefix": ".",
"activity": "BETA",
"activity": "WATCHING:HQ Die",
"defaultTokenSet": "bots.json",
"admins": ["471344177045569546", "448294491032518666"],
"channels": {
@@ -94,6 +94,8 @@
"autoSplit": true,
"autoSplitOnPrizeQuestions": true,
"autoSplitOnLastQuestion": false,
"autoLife": true,
"autoLifeQuestionThreshold": 9,
"splitThreshold": 0.65,
"autoCheckpoints": true,
"checkpointThreshold": 1

View File

@@ -3,7 +3,7 @@ import WebSocket from 'ws';
import { promisify } from 'util';
import 'colors';
import faker from 'faker';
import { discord, proxy } from '../../config';
import { discord, proxy, hq } from '../../config';
import { getTokens, updateTokens } from '../utils/tokens';
import { getPhone, getCode } from '../utils/sms';
@@ -176,6 +176,9 @@ export default class Client {
if (this.master) console.log(`${' HQ '.bgBlue.black}${' Question Summary '.bgGreen.black}`);
if (!this.inTheGame) return;
this.inTheGame = data.youGotItRight;
if (!this.inTheGame && hq.autoLife && this.hasExtraLife) {
if (this.questionNumber > hq.autoLifeQuestionThreshold) this.useExtraLife();
}
if (!this.inTheGame && this.logging) console.log(`${` Client ${this.index} `.bgBlue.black}${' Eliminated '.bgRed.black}`);
break;
case 'gameStatus':