master
标哥丶 2022-03-01 14:48:55 +08:00
parent 9c7b8221bc
commit 4825344616
4 changed files with 108 additions and 15 deletions

View File

@ -132,6 +132,7 @@ async function run() {
if(o.status == 0){ if(o.status == 0){
flag = true flag = true
$.joinVenderId = o.venderId $.joinVenderId = o.venderId
await $.wait(parseInt(Math.random() * 3000 + 2000, 10))
await joinShop() await joinShop()
if($.joinShopresmessage === '活动太火爆,请稍后再试'){ if($.joinShopresmessage === '活动太火爆,请稍后再试'){
console.log('重新开卡') console.log('重新开卡')
@ -175,16 +176,35 @@ async function run() {
if(flag){ if(flag){
await takePostRequest('activityContent'); await takePostRequest('activityContent');
} }
console.log(`${$.score} 游戏:${$.point}`) console.log(`${$.score}`)
$.runFalag = true $.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}`) console.log(`抽奖次数为:${count}`)
for(m=1;count--;m++){ for(m=1;count--;m++){
console.log(`${m}次抽奖`) console.log(`${m}次抽奖`)
await takePostRequest('抽奖'); await takePostRequest('抽奖');
if($.runFalag == false) break if($.runFalag == false) break
if(Number(count) <= 0) break if(Number(count) <= 0) break
if(m >= 10){ if(m >= 5){
console.log("抽奖太多次,多余的次数请再执行脚本") console.log("抽奖太多次,多余的次数请再执行脚本")
break break
} }
@ -208,7 +228,7 @@ async function run() {
if(flag) await $.wait(parseInt(Math.random() * 1000 + 10000, 10)) if(flag) await $.wait(parseInt(Math.random() * 1000 + 10000, 10))
if($.index % 5 == 0) console.log('休息一下别被黑ip了\n可持续发展') 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) { } catch (e) {
console.log(e) console.log(e)
@ -268,6 +288,14 @@ async function takePostRequest(type) {
// url = `${domain}/dingzhi/dz/openCard/saveTask`; // url = `${domain}/dingzhi/dz/openCard/saveTask`;
body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}&taskType=1` body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}&taskType=1`
break; 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 'sign':
case 'addCart': case 'addCart':
case 'browseGoods': case 'browseGoods':
@ -572,6 +600,23 @@ async function dealReturn(type, data) {
console.log(`${type} ${data}`) console.log(`${type} ${data}`)
} }
break; 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 '邀请':
case '助力': case '助力':
// console.log(data) // console.log(data)

View File

@ -185,7 +185,7 @@ async function run() {
await $.wait(parseInt(Math.random() * 1000 + 5000, 10)) await $.wait(parseInt(Math.random() * 1000 + 5000, 10))
if(flag) await $.wait(parseInt(Math.random() * 1000 + 10000, 10)) if(flag) await $.wait(parseInt(Math.random() * 1000 + 10000, 10))
if($.index % 3 == 0) console.log('休息一下别被黑ip了\n可持续发展') 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) { } catch (e) {
console.log(e) console.log(e)
} }

View File

@ -193,6 +193,9 @@ async function run() {
console.log(`后面的号都会助力:${$.shareUuid}`) console.log(`后面的号都会助力:${$.shareUuid}`)
} }
await $.wait(parseInt(Math.random() * 1000 + 5000, 10)) 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) { } catch (e) {
console.log(e) console.log(e)
} }

View File

@ -176,16 +176,36 @@ async function run() {
if(flag){ if(flag){
await takePostRequest('activityContent'); await takePostRequest('activityContent');
} }
console.log(`${$.score} 游戏:${$.point}`) console.log(`${$.score}`)
$.runFalag = true $.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}`) console.log(`抽奖次数为:${count}`)
for(m=1;count--;m++){ for(m=1;count--;m++){
console.log(`${m}次抽奖`) console.log(`${m}次抽奖`)
await takePostRequest('抽奖'); await takePostRequest('抽奖');
if($.runFalag == false) break if($.runFalag == false) break
if(Number(count) <= 0) break if(Number(count) <= 0) break
if(m >= 10){ if(m >= 5){
console.log("抽奖太多次,多余的次数请再执行脚本") console.log("抽奖太多次,多余的次数请再执行脚本")
break break
} }
@ -209,7 +229,7 @@ async function run() {
if(flag) await $.wait(parseInt(Math.random() * 1000 + 10000, 10)) if(flag) await $.wait(parseInt(Math.random() * 1000 + 10000, 10))
if($.index % 3 == 0) console.log('休息一下别被黑ip了\n可持续发展') 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) { } catch (e) {
console.log(e) console.log(e)
@ -269,6 +289,14 @@ async function takePostRequest(type) {
// url = `${domain}/dingzhi/dz/openCard/saveTask`; // url = `${domain}/dingzhi/dz/openCard/saveTask`;
body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}&taskType=1` body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}&taskType=1`
break; 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 'sign':
case 'addCart': case 'addCart':
case 'browseGoods': case 'browseGoods':
@ -573,6 +601,23 @@ async function dealReturn(type, data) {
console.log(`${type} ${data}`) console.log(`${type} ${data}`)
} }
break; 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 '邀请':
case '助力': case '助力':
// console.log(data) // console.log(data)