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

Function pickshell

jd_cfd_loop.js:187–230  ·  view source on GitHub ↗
(body)

Source from the content-addressed store, hash-verified

185 })
186}
187async function pickshell(body) {
188 return new Promise(async (resolve) => {
189 $.get(taskUrl(`story/pickshell`, body), async (err, resp, data) => {
190 try {
191 if (err) {
192 console.log(`${JSON.stringify(err)}`)
193 console.log(`${$.name} pickshell API请求失败,请检查网路重试`)
194 } else {
195 data = JSON.parse(data);
196 let dwName
197 switch (data.Data.strFirstDesc) {
198 case '捡到珍珠了,看起来很贵的样子':
199 dwName = '小珍珠'
200 break
201 case '捡到小海螺了,做成项链一定很漂亮':
202 dwName = '小海螺'
203 break
204 case '把我放在耳边,就能听到大海的声音了~':
205 dwName = '大海螺'
206 break
207 case '只要诚心祈祷,愿望就会实现哦~':
208 dwName = '海星'
209 break
210 default:
211 break
212 }
213 if (data.iRet === 0) {
214 console.log(`捡贝壳成功:捡到了${dwName}`)
215 } else if (data.iRet === 5403 || data.sErrMsg === '这种小贝壳背包放不下啦,先去卖掉一些吧~') {
216 console.log(`捡贝壳失败:${data.sErrMsg}`)
217 await $.wait(1500)
218 await querystorageroom()
219 } else {
220 console.log(`捡贝壳失败:${data.sErrMsg}`)
221 }
222 }
223 } catch (e) {
224 $.logErr(e, resp);
225 } finally {
226 resolve();
227 }
228 })
229 })
230}
231
232// 热气球接客
233async function speedUp() {

Callers 1

queryshellFunction · 0.85

Calls 6

taskUrlFunction · 0.70
querystorageroomFunction · 0.70
getMethod · 0.45
logMethod · 0.45
waitMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected