diff --git a/jd_opencardL86.js b/jd_opencardL86.js index 64ca379..64b065f 100644 --- a/jd_opencardL86.js +++ b/jd_opencardL86.js @@ -132,6 +132,7 @@ async function run() { if(o.status == 0){ flag = true $.joinVenderId = o.venderId + await $.wait(parseInt(Math.random() * 3000 + 2000, 10)) await joinShop() if($.joinShopresmessage === '活动太火爆,请稍后再试'){ console.log('重新开卡') @@ -172,19 +173,38 @@ async function run() { await $.wait(parseInt(Math.random() * 1000 + 3000, 10)) } - if(flag){ - await takePostRequest('activityContent'); - } - console.log(`${$.score}值 游戏:${$.point}`) + if(flag){ + await takePostRequest('activityContent'); + } + console.log(`${$.score}值`) $.runFalag = true - let count = parseInt($.score/100) + let count = parseInt($.score/50) + console.log(`集卡次数为:${count}`) + for(m=1;count--;m++){ + console.log(`第${m}次集卡`) + await takePostRequest('getCardInfo'); + await takePostRequest('集卡'); + if($.runFalag == false) break + if(Number(count) <= 0) break + if(m >= 5){ + console.log("集卡太多次,多余的次数请再执行脚本") + break + } + await $.wait(parseInt(Math.random() * 2000 + 2000, 10)) + } + if(flag){ + await takePostRequest('activityContent'); + } + console.log(`${$.score}值`) + $.runFalag = true + count = parseInt($.score/100) console.log(`抽奖次数为:${count}`) for(m=1;count--;m++){ console.log(`第${m}次抽奖`) await takePostRequest('抽奖'); if($.runFalag == false) break if(Number(count) <= 0) break - if(m >= 10){ + if(m >= 5){ console.log("抽奖太多次,多余的次数请再执行脚本") break } @@ -208,7 +228,7 @@ async function run() { if(flag) await $.wait(parseInt(Math.random() * 1000 + 10000, 10)) if($.index % 5 == 0) console.log('休息一下,别被黑ip了\n可持续发展') - if($.index % 5 == 0) await $.wait(parseInt(Math.random() * 5000 + 10000, 10)) + if($.index % 5 == 0) await $.wait(parseInt(Math.random() * 5000 + 30000, 10)) } catch (e) { console.log(e) @@ -268,6 +288,14 @@ async function takePostRequest(type) { // url = `${domain}/dingzhi/dz/openCard/saveTask`; body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}&taskType=1` break; + case 'getCardInfo': + url = `${domain}/collect/card/getCardInfo`; + body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}` + break; + case '集卡': + url = `${domain}/collect/card/drawCard`; + body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}` + break; case 'sign': case 'addCart': case 'browseGoods': @@ -572,6 +600,23 @@ async function dealReturn(type, data) { console.log(`${type} ${data}`) } break; + case 'getCardInfo': + case '集卡': + if(typeof res == 'object'){ + if(res.result && res.result === true && res.data){ + if(type == "集卡"){ + if(res.data.status == 1) console.log(`集卡成功->${res.data.cardName}`) + else console.log('集卡失败'+ res.data.cardName && '->'+res.data.cardName || '\n'+data) + } + }else if(res.errorMessage){ + console.log(`${type} ${res.errorMessage || ''}`) + }else{ + console.log(`${type} ${data}`) + } + }else{ + console.log(`${type} ${data}`) + } + break; case '邀请': case '助力': // console.log(data) diff --git a/jd_opencardL87.js b/jd_opencardL87.js index 6c1f064..0165703 100644 --- a/jd_opencardL87.js +++ b/jd_opencardL87.js @@ -185,7 +185,7 @@ async function run() { await $.wait(parseInt(Math.random() * 1000 + 5000, 10)) if(flag) await $.wait(parseInt(Math.random() * 1000 + 10000, 10)) if($.index % 3 == 0) console.log('休息一下,别被黑ip了\n可持续发展') - if($.index % 3 == 0) await $.wait(parseInt(Math.random() * 5000 + 10000, 10)) + if($.index % 3 == 0) await $.wait(parseInt(Math.random() * 5000 + 30000, 10)) } catch (e) { console.log(e) } diff --git a/jd_opencardL88.js b/jd_opencardL88.js index 395c5b5..74c10df 100644 --- a/jd_opencardL88.js +++ b/jd_opencardL88.js @@ -193,6 +193,9 @@ async function run() { console.log(`后面的号都会助力:${$.shareUuid}`) } await $.wait(parseInt(Math.random() * 1000 + 5000, 10)) + if(flag) await $.wait(parseInt(Math.random() * 1000 + 10000, 10)) + if($.index % 3 == 0) console.log('休息一下,别被黑ip了\n可持续发展') + if($.index % 3 == 0) await $.wait(parseInt(Math.random() * 5000 + 30000, 10)) } catch (e) { console.log(e) } diff --git a/jd_opencardL89.js b/jd_opencardL89.js index e395f87..f572169 100644 --- a/jd_opencardL89.js +++ b/jd_opencardL89.js @@ -173,19 +173,39 @@ async function run() { await $.wait(parseInt(Math.random() * 1000 + 3000, 10)) } - if(flag){ - await takePostRequest('activityContent'); - } - console.log(`${$.score}值 游戏:${$.point}`) + if(flag){ + await takePostRequest('activityContent'); + } + console.log(`${$.score}值`) $.runFalag = true - let count = parseInt($.score/100) + let count = parseInt($.score/50) + console.log(`集卡次数为:${count}`) + for(m=1;count--;m++){ + if($.compositeCardNum > 0) break + console.log(`第${m}次集卡`) + await takePostRequest('getCardInfo'); + await takePostRequest('集卡'); + if($.runFalag == false || $.compositeCardNum > 0) break + if(Number(count) <= 0) break + if(m >= 5){ + console.log("集卡太多次,多余的次数请再执行脚本") + break + } + await $.wait(parseInt(Math.random() * 2000 + 2000, 10)) + } + if(flag){ + await takePostRequest('activityContent'); + } + console.log(`${$.score}值`) + $.runFalag = true + count = parseInt($.score/100) console.log(`抽奖次数为:${count}`) for(m=1;count--;m++){ console.log(`第${m}次抽奖`) await takePostRequest('抽奖'); if($.runFalag == false) break if(Number(count) <= 0) break - if(m >= 10){ + if(m >= 5){ console.log("抽奖太多次,多余的次数请再执行脚本") break } @@ -209,7 +229,7 @@ async function run() { if(flag) await $.wait(parseInt(Math.random() * 1000 + 10000, 10)) if($.index % 3 == 0) console.log('休息一下,别被黑ip了\n可持续发展') - if($.index % 3 == 0) await $.wait(parseInt(Math.random() * 5000 + 10000, 10)) + if($.index % 3 == 0) await $.wait(parseInt(Math.random() * 5000 + 30000, 10)) } catch (e) { console.log(e) @@ -269,6 +289,14 @@ async function takePostRequest(type) { // url = `${domain}/dingzhi/dz/openCard/saveTask`; body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}&taskType=1` break; + case 'getCardInfo': + url = `${domain}/collect/card/getCardInfo`; + body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}` + break; + case '集卡': + url = `${domain}/collect/card/drawCard`; + body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}` + break; case 'sign': case 'addCart': case 'browseGoods': @@ -573,6 +601,23 @@ async function dealReturn(type, data) { console.log(`${type} ${data}`) } break; + case 'getCardInfo': + case '集卡': + if(typeof res == 'object'){ + if(res.result && res.result === true && res.data){ + if(type == "集卡"){ + if(res.data.status == 1) console.log(`集卡成功->${res.data.cardName}`) + else console.log('集卡失败'+ res.data.cardName && '->'+res.data.cardName || '\n'+data) + } + }else if(res.errorMessage){ + console.log(`${type} ${res.errorMessage || ''}`) + }else{ + console.log(`${type} ${data}`) + } + }else{ + console.log(`${type} ${data}`) + } + break; case '邀请': case '助力': // console.log(data)