master
parent
9c7b8221bc
commit
4825344616
|
@ -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('重新开卡')
|
||||
|
@ -175,16 +176,35 @@ async function run() {
|
|||
if(flag){
|
||||
await takePostRequest('activityContent');
|
||||
}
|
||||
console.log(`${$.score}值 游戏:${$.point}`)
|
||||
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)
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -176,16 +176,36 @@ async function run() {
|
|||
if(flag){
|
||||
await takePostRequest('activityContent');
|
||||
}
|
||||
console.log(`${$.score}值 游戏:${$.point}`)
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue