diff --git a/autoWebview.js b/autoWebview.js index ef14a95..8819fee 100644 --- a/autoWebview.js +++ b/autoWebview.js @@ -1,7 +1,7 @@ /* eslint-disable */ 'ui'; // 一. 开发使用本地地址调试 -initUi('http://192.168.83.108:5666/') +initUi('http://192.168.170.108:5666/') // initUi('http://172.21.32.205:5666/') // 二.上线 diff --git a/images/shiYong.jpg b/images/shiYong.jpg new file mode 100644 index 0000000..5020a97 Binary files /dev/null and b/images/shiYong.jpg differ diff --git a/images/xhao3.jpg b/images/xhao3.jpg new file mode 100644 index 0000000..6f57cf2 Binary files /dev/null and b/images/xhao3.jpg differ diff --git a/src/assets/img/waTu.jpg b/src/assets/img/waTu.jpg new file mode 100644 index 0000000..ff93895 Binary files /dev/null and b/src/assets/img/waTu.jpg differ diff --git a/src/auto/robot/robot.fiveBen.js b/src/auto/robot/robot.fiveBen.js index de7e2d4..35964ce 100644 --- a/src/auto/robot/robot.fiveBen.js +++ b/src/auto/robot/robot.fiveBen.js @@ -18,7 +18,7 @@ function isFight(){ // 在副本战斗中,在点击进入战斗的时候 可能会出现对话 需要快速跳过 function isFuBengFight(){ - if(isHasImageTemplate('fuBengFight.jpg')){ + if(isHasImageTemplate('fuBengFight.jpg') || hasText('点击任意') || hasText('任意地方') || hasText('地方继续')){ // 因为副本在进入在战斗的时候 可能会出现对话 for(var i = 0; i<8;i++){ randomClick() diff --git a/src/auto/robot/robot.waTu.js b/src/auto/robot/robot.waTu.js new file mode 100644 index 0000000..a1cf20d --- /dev/null +++ b/src/auto/robot/robot.waTu.js @@ -0,0 +1,27 @@ +// 挖图脚本 +auto(); + +const {findTextAndClick,loopFunction,isHasImageTemplate,isFighting,randomClick,clickImageTemplate,hasText,findTextRect} = require('util.js') +toastLog('挖图脚本执行中...') + +while(true){ + if(isFighting()){ + log('战斗中...') + sleep(5000) + } + sleep(500) + var res = loopFunction(function(){ + sleep(1000) + return findTextAndClick('使用',{region:'rightBottomHalf'}) + },55) + if(!res){ + // 由于加图片得更新包,后续再更新用图片找使用功能 + // var res3 = loopFunction(function(){ + // return clickImageTemplate('shiYong.jpg',{region:'rightBottomHalf'}) + // },12) + // if(!res3){ + // } + break + } +} +toastLog('挖图脚本执行结束') diff --git a/src/main.js b/src/main.js index 414713b..9e8955f 100644 --- a/src/main.js +++ b/src/main.js @@ -6,6 +6,8 @@ import './flexable' import router from './router' import './store' import vant from 'vant' +import 'vant/es/dialog/style'; + // 初始化autojs 全局函数 auto.execAjCode(require('@/auto/global/robot.global')) auto.execAjCode(require('@/auto/global/robot.menu')) diff --git a/src/router.js b/src/router.js index 80d9a19..298cde2 100644 --- a/src/router.js +++ b/src/router.js @@ -47,6 +47,11 @@ const routes = [ name: 'paTa', component: () => import('./views/home/paTa.vue'), }, + { + path: '/waTu', + name: 'waTu', + component: () => import('./views/home/waTu.vue'), + }, { path: '/qiang', name: 'qiang', diff --git a/src/views/home/index.vue b/src/views/home/index.vue index c5ff801..f3f7d6f 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -1,6 +1,5 @@ + diff --git a/util.js b/util.js index fea75bb..51a0637 100644 --- a/util.js +++ b/util.js @@ -385,6 +385,10 @@ function clickClosePoint(){ log('有一个x号,点击关闭,这个x号是擂台提示的'); sleep(1500) clickImageTemplate('xhao2.jpg',{region:'rightHalf'}) + }else if(isHasImageTemplate('xhao3.jpg'){ + log('有一个x号,点击关闭,这个x号是擂台提示的'); + sleep(1500) + clickImageTemplate('xhao3.jpg') }else{ break; }