增加割草,割小鸡上限判断
This commit is contained in:
20
jd_jxmc.js
20
jd_jxmc.js
@@ -132,8 +132,9 @@ async function pasture() {
|
|||||||
await $.wait(2000);
|
await $.wait(2000);
|
||||||
if (j === 2) {
|
if (j === 2) {
|
||||||
//割草
|
//割草
|
||||||
console.log(`\n开始进行10次割草`);
|
console.log(`\n开始进行割草`);
|
||||||
for (let i = 0; i < 10; i++) {
|
$.runFlag = true;
|
||||||
|
for (let i = 0; i < 30 && $.runFlag; i++) {
|
||||||
$.mowingInfo = {};
|
$.mowingInfo = {};
|
||||||
console.log(`开始第${i + 1}次割草`);
|
console.log(`开始第${i + 1}次割草`);
|
||||||
await takeGetRequest('mowing');
|
await takeGetRequest('mowing');
|
||||||
@@ -145,9 +146,11 @@ async function pasture() {
|
|||||||
await $.wait(5000);
|
await $.wait(5000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//横扫鸡腿
|
//横扫鸡腿
|
||||||
console.log(`\n开始进行10次横扫鸡腿`);
|
$.runFlag = true;
|
||||||
for (let i = 0; i < 10; i++) {
|
console.log(`\n开始进行横扫鸡腿`);
|
||||||
|
for (let i = 0; i < 30 && $.runFlag; i++) {
|
||||||
console.log(`开始第${i + 1}次横扫鸡腿`);
|
console.log(`开始第${i + 1}次横扫鸡腿`);
|
||||||
await takeGetRequest('jump');
|
await takeGetRequest('jump');
|
||||||
await $.wait(2000);
|
await $.wait(2000);
|
||||||
@@ -327,7 +330,14 @@ function dealReturn(type, data) {
|
|||||||
data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]);
|
data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]);
|
||||||
if (data.ret === 0) {
|
if (data.ret === 0) {
|
||||||
$.mowingInfo = data.data;
|
$.mowingInfo = data.data;
|
||||||
console.log(`获得金币:${ ($.mowingInfo.addcoins || $.mowingInfo.addcoin) ? ($.mowingInfo.addcoins || $.mowingInfo.addcoin) : 0 }`)
|
let add = ($.mowingInfo.addcoins || $.mowingInfo.addcoin) ? ($.mowingInfo.addcoins || $.mowingInfo.addcoin) : 0;
|
||||||
|
console.log(`获得金币:${add}`);
|
||||||
|
if(Numbe(add) >0 ){
|
||||||
|
$.runFlag = true;
|
||||||
|
}else{
|
||||||
|
$.runFlag = false;
|
||||||
|
console.log(`未获得金币暂停${type}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'GetSelfResult':
|
case 'GetSelfResult':
|
||||||
|
Reference in New Issue
Block a user