MCPcopy Create free account
hub / github.com/Semporia/Scripts / helpFriends

Function helpFriends

jd_jxnc.js:562–580  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

560
561// 为好友助力 return true 继续助力 false 助力结束
562async function helpFriends() {
563 let tmpShareCodeJson = {};
564 for (let code of currentShareCode) {
565 if (!code) {
566 continue
567 }
568 tmpShareCodeJson = changeShareCodeJson(code);
569 if (!tmpShareCodeJson) { //非 json 格式跳过
570 console.log('助力码非 json 格式,跳过')
571 continue;
572 }
573 const next = await helpShareCode(tmpShareCodeJson['smp'], tmpShareCodeJson['active'], tmpShareCodeJson['joinnum']);
574 if (!next) {
575 return false;
576 }
577 await $.wait(1000);
578 }
579 return true;
580}
581
582// 执行助力 return true 继续助力 false 助力结束
583function helpShareCode(smp, active, joinnum) {

Callers 1

jdJXNCFunction · 0.70

Calls 4

changeShareCodeJsonFunction · 0.85
helpShareCodeFunction · 0.85
logMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected