经测试,去掉抽奖延迟时间也正常,故去掉延迟时间,减少脚本运行时间
This commit is contained in:
@@ -123,6 +123,20 @@ async function doTasks() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function shaking() {
|
async function shaking() {
|
||||||
|
for (let i = 0; i < new Array($.leftShakingTimes).fill('').length; i++) {
|
||||||
|
console.log(`开始新版-摇奖`)
|
||||||
|
// await $.wait(500);
|
||||||
|
const newShakeBeanRes = await vvipclub_shaking_lottery();
|
||||||
|
if (newShakeBeanRes.success) {
|
||||||
|
console.log(`新版-剩余摇奖次数:${newShakeBeanRes.data.remainLotteryTimes}`)
|
||||||
|
if (newShakeBeanRes.data && newShakeBeanRes.data.rewardBeanAmount) {
|
||||||
|
$.prizeBeanCount += newShakeBeanRes.data.rewardBeanAmount;
|
||||||
|
console.log(`恭喜你,中奖了,获得${newShakeBeanRes.data.rewardBeanAmount}京豆\n`)
|
||||||
|
} else {
|
||||||
|
console.log(`未中奖\n`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
for (let i = 0; i < new Array($.freeTimes).fill('').length; i++) {
|
for (let i = 0; i < new Array($.freeTimes).fill('').length; i++) {
|
||||||
console.log(`开始摇奖`)
|
console.log(`开始摇奖`)
|
||||||
await $.wait(1000);
|
await $.wait(1000);
|
||||||
@@ -135,20 +149,6 @@ async function shaking() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (let i = 0; i < new Array($.leftShakingTimes).fill('').length; i++) {
|
|
||||||
console.log(`开始新版-摇奖`)
|
|
||||||
await $.wait(1000);
|
|
||||||
const newShakeBeanRes = await vvipclub_shaking_lottery();
|
|
||||||
if (newShakeBeanRes.success) {
|
|
||||||
console.log(`新版-剩余摇奖次数:${newShakeBeanRes.data.remainLotteryTimes}`)
|
|
||||||
if (newShakeBeanRes.data && newShakeBeanRes.data.rewardBeanAmount) {
|
|
||||||
$.prizeBeanCount += newShakeBeanRes.data.rewardBeanAmount;
|
|
||||||
console.log(`恭喜你,中奖了,获得${newShakeBeanRes.data.rewardBeanAmount}京豆\n`)
|
|
||||||
} else {
|
|
||||||
console.log(`未中奖\n`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
function showMsg() {
|
function showMsg() {
|
||||||
if ($.prizeBeanCount) {
|
if ($.prizeBeanCount) {
|
||||||
|
Reference in New Issue
Block a user