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

Function energyCollect

jd_pet.js:158–167  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

156}
157// 收取所有好感度
158async function energyCollect() {
159 console.log('开始收取任务奖励好感度');
160 let function_id = arguments.callee.name.toString();
161 const response = await request(function_id);
162 // console.log(`收取任务奖励好感度完成:${JSON.stringify(response)}`);
163 if (response.resultCode === '0') {
164 message += `【第${response.result.medalNum + 1}块勋章完成进度】${response.result.medalPercent}%,还需收集${response.result.needCollectEnergy}好感\n`;
165 message += `【已获得勋章】${response.result.medalNum}块,还需收集${response.result.needCollectMedalNum}块即可兑换奖品“${$.petInfo.goodsInfo.goodsName}”\n`;
166 }
167}
168//再次投食
169async function feedPetsAgain() {
170 const response = await request('initPetTown');//再次初始化萌宠

Callers 1

jdPetFunction · 0.85

Calls 2

requestFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected