MCPcopy Create free account
hub / github.com/Mashiro2000/HeyTapTask / runBattleTask

Method runBattleTask

Backup/BattleForHeyTap.py:177–227  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

175 time.sleep(random.randint(1,3))
176
177 def runBattleTask(self):
178 for each in self.taskData:
179 if each['title'] == '浏览一加专区':
180 if each['t_status'] == 0:
181 self.runViewTask(dic=each)
182 elif each['t_status'] == 1:
183 self.receiveAward(each)
184 elif each['t_status'] == 2:
185 notify(f"[{each['title']}]\t领取成功")
186 elif each['title'] == '浏览潮流好物专区':
187 if each['t_status'] == 0:
188 self.runViewTask(dic=each)
189 elif each['t_status'] == 1:
190 self.receiveAward(each)
191 elif each['t_status'] == 2:
192 notify(f"[{each['title']}]\t任务完成")
193 elif each['title'] == '观看realme直播':
194 if each['t_status'] == 0:
195 self.runViewTask(dic=each)
196 elif each['t_status'] == 1:
197 self.receiveAward(each)
198 elif each['t_status'] == 2:
199 notify(f"[{each['title']}]\t任务完成")
200 elif each['title'] == '观看一加直播':
201 if each['t_status'] == 0:
202 self.runViewTask(dic=each)
203 elif each['t_status'] == 1:
204 self.receiveAward(each)
205 elif each['t_status'] == 2:
206 notify(f"[{each['title']}]\t任务完成")
207 elif each['title'] == '浏览超级宠粉专区':
208 if each['t_status'] == 0:
209 self.runViewTask(dic=each)
210 elif each['t_status'] == 1:
211 self.receiveAward(each)
212 elif each['t_status'] == 2:
213 notify(f"[{each['title']}]\t任务完成")
214 elif each['title'] == '浏览realme专区':
215 if each['t_status'] == 0:
216 self.runViewTask(dic=each)
217 elif each['t_status'] == 1:
218 self.receiveAward(each)
219 elif each['t_status'] == 2:
220 notify(f"[{each['title']}]\t任务完成")
221 elif each['title'] == '预约真我GT Neo2T' or each['title'] == '浏览真我GT Neo2T':
222 if each['t_status'] == 0:
223 self.runViewTask(dic=each)
224 elif each['t_status'] == 1:
225 self.receiveAward(each)
226 elif each['t_status'] == 2:
227 notify(f"[{each['title']}]\t任务完成")
228
229 # 执行欢太商城实例对象
230 def start(self):

Callers 1

startMethod · 0.95

Calls 3

runViewTaskMethod · 0.95
receiveAwardMethod · 0.95
notifyFunction · 0.70

Tested by

no test coverage detected