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

Function cfd

jd_cfd.js:126–288  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124 .finally(() => $.done());
125
126async function cfd() {
127 try {
128 let beginInfo = await getUserInfo();
129 if (beginInfo.LeadInfo.dwLeadType === 2) {
130 console.log(`还未开通活动,尝试初始化`)
131 await noviceTask()
132 await $.wait(3000)
133 beginInfo = await getUserInfo(false);
134 if (beginInfo.LeadInfo.dwLeadType !== 2) {
135 console.log(`初始化成功\n`)
136 } else {
137 console.log(`初始化失败\n`)
138 return
139 }
140 }
141
142 // 寻宝
143 console.log(`寻宝`)
144 let XBDetail = beginInfo.XbStatus.XBDetail.filter((x) => x.dwRemainCnt !== 0)
145 if (XBDetail.length !== 0) {
146 console.log(`开始寻宝`)
147 $.break = false
148 for (let key of Object.keys(XBDetail)) {
149 let vo = XBDetail[key]
150 await $.wait(4000)
151 await TreasureHunt(vo.strIndex)
152 if ($.break) break
153 }
154 } else {
155 console.log(`暂无宝物`)
156 }
157
158 //每日签到
159 await $.wait(3000)
160 await getTakeAggrPage('sign')
161
162 //小程序每日签到
163 await $.wait(3000)
164 await getTakeAggrPage('wxsign')
165
166 if (new Date().getHours() < 22){
167 //使用道具
168 await $.wait(3000)
169 await GetPropCardCenterInfo()
170 }
171
172 //助力奖励
173 await $.wait(3000)
174 await getTakeAggrPage('helpdraw')
175
176 console.log('')
177 //卖贝壳
178 // await $.wait(3000)
179 // await querystorageroom('1')
180
181 //升级建筑
182 await $.wait(3000)
183 for(let key of Object.keys($.info.buildInfo.buildList)) {

Callers 1

jd_cfd.jsFile · 0.70

Calls 15

noviceTaskFunction · 0.85
TreasureHuntFunction · 0.85
getTakeAggrPageFunction · 0.85
GetPropCardCenterInfoFunction · 0.85
getBuildInfoFunction · 0.85
specialUserOperFunction · 0.85
collectorOperFunction · 0.85
mermaidOperFunction · 0.85
queryRubbishInfoFunction · 0.85
getActTaskFunction · 0.85
getPropTaskFunction · 0.85
getUserInfoFunction · 0.70

Tested by

no test coverage detected