修复bug
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
jd宠汪汪 搬的https://github.com/uniqueque/QuantumultX/blob/4c1572d93d4d4f883f483f907120a75d925a693e/Script/jd_joy.js
|
||||
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
|
||||
IOS用户支持京东双账号,NodeJs用户支持N个京东账号
|
||||
更新时间:2020-12-05
|
||||
更新时间:2020-12-06
|
||||
建议先凌晨0点运行jd_joy.js脚本获取狗粮后,再运行此脚本(jd_joy_steal.js)可偷好友积分,6点运行可偷好友狗粮
|
||||
feedCount:自定义 每次喂养数量; 等级只和喂养次数有关,与数量无关
|
||||
推荐每次投喂10个,积累狗粮,然后去聚宝盆赌每小时的幸运奖,据观察,投入3000-6000中奖概率大,超过7000基本上注定亏本,即使是第一名
|
||||
@@ -134,11 +134,11 @@ async function joinTwoPeopleRun() {
|
||||
console.log(`\n===========以下是双人赛跑信息========\n`)
|
||||
await getPetRace();
|
||||
if ($.petRaceResult) {
|
||||
teamLevel = $.isNode() ? (process.env.JOY_TEAM_LEVEL ? process.env.JOY_TEAM_LEVEL : teamLevel) : ($.getdata('JOY_TEAM_LEVEL') ? $.getdata('JOY_TEAM_LEVEL') : teamLevel);
|
||||
let petRaceResult = $.petRaceResult.data.petRaceResult;
|
||||
let raceUsers = $.petRaceResult.data.raceUsers;
|
||||
console.log(`赛跑状态:${petRaceResult}\n`);
|
||||
if (petRaceResult === 'not_participate') {
|
||||
teamLevel = $.isNode() ? (process.env.JOY_TEAM_LEVEL ? process.env.JOY_TEAM_LEVEL : teamLevel) : ($.getdata('JOY_TEAM_LEVEL') ? $.getdata('JOY_TEAM_LEVEL') : teamLevel);
|
||||
console.log(`暂未参赛,现在为您参加${teamLevel}人赛跑`);
|
||||
await runMatch(teamLevel * 1);
|
||||
if ($.runMatchResult.success) {
|
||||
@@ -168,7 +168,7 @@ async function joinTwoPeopleRun() {
|
||||
console.log(`领取赛跑奖励结果:${JSON.stringify($.receiveJoyRunAwardRes)}`)
|
||||
if ($.receiveJoyRunAwardRes.success) {
|
||||
$.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n太棒了,${teamLevel}人赛跑取得获胜\n恭喜您已获得${winCoin}积分奖励`);
|
||||
await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index}${$.nickName}\n${teamLevel}人赛跑取得获胜\n恭喜您已获得${winCoin}积分奖励`)
|
||||
if ($.isNode()) await notify.sendNotify(`${$.name} - 京东账号${$.index} - ${$.nickName}`, `京东账号${$.index}${$.nickName}\n${teamLevel}人赛跑取得获胜\n恭喜您已获得${winCoin}积分奖励`)
|
||||
}
|
||||
}
|
||||
if (petRaceResult === 'participate') {
|
||||
@@ -612,6 +612,7 @@ function getPetRace() {
|
||||
}
|
||||
//参加赛跑API
|
||||
function runMatch(teamLevel, timeout = 5000) {
|
||||
if (teamLevel === 10 || teamLevel === 50) timeout = 60000;
|
||||
console.log(`正在参赛中,请稍等${timeout / 1000}秒,以防多个账号匹配到统一赛场\n`)
|
||||
return new Promise(async resolve => {
|
||||
await $.wait(timeout);
|
||||
|
Reference in New Issue
Block a user