mirror of https://github.com/KingRan/KR.git
parent
a833a6fd43
commit
cdaf734415
|
@ -140,6 +140,10 @@ async function run() {
|
||||||
$.joinVenderId = o.venderId
|
$.joinVenderId = o.venderId
|
||||||
await $.wait(parseInt(Math.random() * 1000 + 3000, 10))
|
await $.wait(parseInt(Math.random() * 1000 + 3000, 10))
|
||||||
await joinShop()
|
await joinShop()
|
||||||
|
if($.joinShopresmessage === '活动太火爆,请稍后再试'){
|
||||||
|
console.log('重新开卡')
|
||||||
|
await joinShop()
|
||||||
|
}
|
||||||
await $.wait(parseInt(Math.random() * 1000 + 3000, 10))
|
await $.wait(parseInt(Math.random() * 1000 + 3000, 10))
|
||||||
await takePostRequest('activityContent');
|
await takePostRequest('activityContent');
|
||||||
await takePostRequest('drawContent');
|
await takePostRequest('drawContent');
|
||||||
|
@ -163,7 +167,18 @@ async function run() {
|
||||||
await takePostRequest('邀请');
|
await takePostRequest('邀请');
|
||||||
}
|
}
|
||||||
// await takePostRequest('startDraw');
|
// await takePostRequest('startDraw');
|
||||||
|
if(!$.viewVideo && !$.outFlag){
|
||||||
|
flag = true
|
||||||
|
await takePostRequest('viewVideo');
|
||||||
|
await $.wait(parseInt(Math.random() * 1000 + 3000, 10))
|
||||||
|
|
||||||
|
}
|
||||||
|
if(!$.addSku && !$.outFlag){
|
||||||
|
flag = true
|
||||||
|
await takePostRequest('addSku');
|
||||||
|
await $.wait(parseInt(Math.random() * 1000 + 3000, 10))
|
||||||
|
|
||||||
|
}
|
||||||
if(flag){
|
if(flag){
|
||||||
await takePostRequest('activityContent');
|
await takePostRequest('activityContent');
|
||||||
}
|
}
|
||||||
|
@ -175,7 +190,7 @@ async function run() {
|
||||||
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
|
||||||
}
|
}
|
||||||
|
@ -190,7 +205,7 @@ async function run() {
|
||||||
await takePostRequest('getCardInfo');
|
await takePostRequest('getCardInfo');
|
||||||
if($.runFalag == false || $.compositeCardNum > 0) break
|
if($.runFalag == false || $.compositeCardNum > 0) break
|
||||||
if(Number(count) <= 0) break
|
if(Number(count) <= 0) break
|
||||||
if(m >= 10){
|
if(m >= 5){
|
||||||
console.log("集卡太多次,多余的次数请再执行脚本")
|
console.log("集卡太多次,多余的次数请再执行脚本")
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -316,12 +331,12 @@ async function takePostRequest(type) {
|
||||||
case 'visitSku':
|
case 'visitSku':
|
||||||
case 'toShop':
|
case 'toShop':
|
||||||
case 'addSku':
|
case 'addSku':
|
||||||
url = `${domain}/dingzhi/dz/openCard/saveTask`;
|
url = `${domain}/play/monopoly/doTasks`;
|
||||||
let taskType = ''
|
let taskType = ''
|
||||||
let taskValue = ''
|
let taskValue = ''
|
||||||
if(type == 'viewVideo'){
|
if(type == 'viewVideo'){
|
||||||
taskType = 31
|
taskType = 0
|
||||||
taskValue = 31
|
taskValue = 0
|
||||||
}else if(type == 'visitSku'){
|
}else if(type == 'visitSku'){
|
||||||
taskType = 5
|
taskType = 5
|
||||||
taskValue = $.visitSkuValue || 5
|
taskValue = $.visitSkuValue || 5
|
||||||
|
@ -329,8 +344,8 @@ async function takePostRequest(type) {
|
||||||
taskType = 14
|
taskType = 14
|
||||||
taskValue = $.toShopValue || 14
|
taskValue = $.toShopValue || 14
|
||||||
}else if(type == 'addSku'){
|
}else if(type == 'addSku'){
|
||||||
taskType = 2
|
taskType = 21
|
||||||
taskValue = $.addSkuValue || 2
|
taskValue = $.addSkuValue || 21
|
||||||
}
|
}
|
||||||
body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}&taskType=${taskType}&taskValue=${taskValue}`
|
body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}&taskType=${taskType}&taskValue=${taskValue}`
|
||||||
break;
|
break;
|
||||||
|
@ -791,6 +806,7 @@ function joinShop() {
|
||||||
if(typeof res == 'object'){
|
if(typeof res == 'object'){
|
||||||
if(res.success === true){
|
if(res.success === true){
|
||||||
console.log(res.message)
|
console.log(res.message)
|
||||||
|
$.joinShopresmessage = res.message
|
||||||
if(res.result && res.result.giftInfo){
|
if(res.result && res.result.giftInfo){
|
||||||
for(let i of res.result.giftInfo.giftList){
|
for(let i of res.result.giftInfo.giftList){
|
||||||
console.log(`入会获得:${i.discountString}${i.prizeName}${i.secondLineDesc}`)
|
console.log(`入会获得:${i.discountString}${i.prizeName}${i.secondLineDesc}`)
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue