dongri_task.py 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782
  1. # -*- coding: utf-8 -*-
  2. import threading
  3. from scriptBase.imgFind import pcacc_img, savePic, set_isDown
  4. from scriptBase.mouseClick import pcacc_mouse
  5. from scriptBase.ocr import capture_and_ocr
  6. import scriptBase.base
  7. from scriptBase.comon import *
  8. from scriptBase.ocr import *
  9. from apscheduler.schedulers.blocking import BlockingScheduler
  10. import pyautogui
  11. import random
  12. import sys
  13. import math
  14. import os
  15. import time
  16. from dongri_define import *
  17. from dongri_pic import *
  18. import subprocess
  19. import socket
  20. from datetime import datetime, timedelta
  21. import datetime as dt
  22. '''
  23. 基础配置说明:
  24. 600*800(DPI 300)
  25. 游戏画面:流畅
  26. 高帧率关闭
  27. 町中模式:旧版
  28. '''
  29. todo_msg = ''
  30. todo_list = []
  31. g_task_lineCheck = False
  32. g_nextTaskTime = time.time()
  33. def set_nextTaskTime(val):
  34. global g_nextTaskTime
  35. g_nextTaskTime = val + time.time()
  36. def get_nextTaskTime():
  37. global g_nextTaskTime
  38. ret = g_nextTaskTime - time.time()
  39. if ret < 0:
  40. return 0
  41. return ret
  42. def set_lineCheck(val):
  43. global g_task_lineCheck
  44. g_task_lineCheck = val
  45. def get_todo_msg():
  46. global todo_msg
  47. return todo_msg
  48. def get_todo_msgList():
  49. global todo_list
  50. todo_str = ''
  51. for item in todo_list:
  52. todo_str += f'{item["item"]}:{item["time"]}</br>'
  53. return todo_str
  54. def get_todo_time(todo_str):
  55. global todo_list
  56. for item in todo_list:
  57. if item['item'] == todo_str:
  58. return item['time']
  59. return None
  60. def is_within_n_minutes(target_time_str, n_minutes_left, n_minutes_right):
  61. if target_time_str == None or type(target_time_str) is not str:
  62. return False
  63. # 获取当前时间
  64. now = datetime.now()
  65. # 解析目标时间字符串
  66. try:
  67. target_time = datetime.strptime(target_time_str, "%H:%M")
  68. # 将目标时间的日期部分设置为当前日期
  69. target_time = target_time.replace(year=now.year, month=now.month, day=now.day)
  70. except ValueError:
  71. return False
  72. # 计算时间范围
  73. start_time = target_time - timedelta(minutes=n_minutes_left)
  74. end_time = target_time + timedelta(minutes=n_minutes_right)
  75. # 检查当前时间是否在范围内
  76. return start_time <= now <= end_time
  77. def fing_todoList_time(taskStr):
  78. for item in todo_list:
  79. if item['task'] == taskStr:
  80. return item['time']
  81. def task_getComputerName():
  82. return socket.gethostname()
  83. def task_acceptTask():
  84. while True:
  85. myTimeSleep_big()
  86. class basic_operate:
  87. @staticmethod
  88. def do_back():
  89. task_return_game()
  90. ret = False
  91. if waitFindImg_withBool([place_img.outside, place_img.town], 0.1, 0) == True:
  92. return True
  93. ret |= waitClickImg_noWait_withBool(place_img.back1, 0.6, 0)
  94. if ret:
  95. return ret
  96. ret |= waitClickImg_noWait_withBool([place_img.back2, place_img.back4], 0.6, 0)
  97. if ret:
  98. return ret
  99. ret, pos = waitFindImg(place_img.title, 1, 0)
  100. if ret:
  101. pcacc_mouse.click(pos[0] - 20, pos[1] + 80)
  102. @staticmethod
  103. def backToGame(preTime = 0):
  104. tryMaxTimes = 5
  105. while tryMaxTimes > 0:
  106. tryMaxTimes -= 1
  107. if waitFindImg_withBool((place_img.gameIn, place_img.gameIn2), 1, preTime) == False:
  108. basic_operate.do_back()
  109. else:
  110. return True
  111. return False
  112. @staticmethod
  113. def go_town(preTime = 0):
  114. if basic_operate.backToGame(preTime) == False:
  115. return False
  116. waitClickImg_noWait_withBool(place_img.outside, 0.6, 0.5)
  117. waitFindImg_withBool(place_img.town, 2, 0.5)
  118. return True
  119. @staticmethod
  120. def go_outside(preTime = 0):
  121. if basic_operate.backToGame(preTime) == False:
  122. return False
  123. waitClickImg_noWait_withBool(place_img.town, 0.6, 0.5)
  124. waitFindImg_withBool(place_img.outside, 2, 0.5)
  125. return True
  126. @staticmethod
  127. def click_outside_search():
  128. taskListRet, taskListPos = waitFindImg(monster_img.tasklist, 2, 3)
  129. if taskListRet == False:
  130. return False
  131. else:
  132. pcacc_mouse.click(taskListPos[0], taskListPos[1] - 110)#click search
  133. myTimeSleep_big()
  134. return True
  135. @staticmethod
  136. def enter_auto_supply_resource(enter_pic):
  137. if waitClickImg_noWait_withBool(enter_pic, 2, 2) == False:
  138. return False
  139. if waitClickImg_noWait_withBool(train_img.getAll, 2, 1) == False:
  140. return True
  141. if waitClickImg_noWait_withBool(train_img.enter, 2, 1) == False:
  142. return False
  143. if waitClickImg_noWait_withBool(enter_pic, 2, 1) == False:
  144. return False
  145. return True
  146. @staticmethod
  147. def return_line():
  148. if waitClickImg_noWait_withBool(monster_img.returnLine, 1, 0.5) == False:
  149. return False
  150. if waitClickImg_noWait_withBool(monster_img.enter, 2, 1) == False:
  151. return False
  152. return True
  153. @staticmethod
  154. def add_strength():
  155. if waitClickImg_noWait_withBool(check_img.no_strength, 2, 1) == False:
  156. return False
  157. if waitClickImg_noWait_withBool(check_img.add_strength, 2, 1) == False:
  158. return False
  159. if waitClickImg_noWait_withBool(information_img.add_strength, 2, 1) == False:
  160. return False
  161. if waitClickImg_noWait_withBool(information_img.add_strength, 2, 1) == False:
  162. return False
  163. if waitClickImg_noWait_withBool(information_img.add_strength, 2, 1) == False:
  164. return False
  165. return True
  166. @staticmethod
  167. def get_line_num2():
  168. lineStr = yys_ocrAuto(check_img.line_orc)
  169. if len(lineStr) == 0:
  170. return 0
  171. match = re.search(r'\d', lineStr[0]) # 查找第一个数字
  172. if match:
  173. first_digit = match.group()
  174. print("第一个数字:", first_digit)
  175. return int(first_digit)
  176. else:
  177. print("未找到数字")
  178. return 0
  179. @staticmethod
  180. def get_line_num():
  181. meat_num = len(pcacc_img.find_all_image_locations(check_img.on_meat))
  182. wood_num = len(pcacc_img.find_all_image_locations(check_img.on_wood))
  183. mine_num = len(pcacc_img.find_all_image_locations(check_img.on_mine))
  184. stone_num = len(pcacc_img.find_all_image_locations(check_img.on_stone))
  185. return meat_num + wood_num + mine_num + stone_num
  186. def task_return_game():
  187. tryTimes = 3
  188. while tryTimes > 0:
  189. if False == waitFindImg_withBool([place_img.title], 2, 0):
  190. waitClickImg_noWait([place_img.ico, place_img.ico2, place_img.ico3], 1, 0)
  191. myTimeSleep_big()
  192. tryTimes -= 1
  193. if tryTimes == 0:
  194. return False
  195. else:
  196. break
  197. def task_save_compress_pic():
  198. # 截取屏幕截图
  199. screenshot = pyautogui.screenshot()
  200. compressed_data = compress_image(screenshot)
  201. # 保存压缩后的图像到文件
  202. with open('compressed_screenshot.jpg', 'wb') as f:
  203. f.write(compressed_data)
  204. def task_close_game():
  205. subprocess.call(f"taskkill /f /im MuMuNxDevice.exe")
  206. subprocess.call(f"taskkill /f /im MuMuNxMain.exe")
  207. subprocess.call(f"taskkill /f /im MuMuVMMHeadless.exe")
  208. subprocess.call(f"taskkill /f /im MuMuVMMSVC.exe")
  209. myTimeSleep_big()
  210. def task_start_game(type=0):
  211. isSuccess = True
  212. path1 = R'C:\\Program Files\\Netease\\MuMu Player 12\\nx_main\\MuMuNxMain.exe'
  213. path2 = R'C:\Program Files\Netease\MuMu Player 12\shell\MuMuNxMain.exe'
  214. param = " -v 0"
  215. if os.path.exists(path1):
  216. subprocess.Popen(path1 + param)
  217. elif os.path.exists(path2):
  218. subprocess.Popen(path2)
  219. waitClickImg_withBool(gameStart_img.not_upgrade, 20, 10)
  220. if type == 0:
  221. if waitClickImg_withBool(gameStart_img.ico, 100, 0) == False:
  222. return False
  223. else:
  224. waitClickImg_withBool(gameStart_img.second_game, 100, 0)
  225. if waitClickImg_withBool(gameStart_img.ico, 5, 1) == False:
  226. return False
  227. waitTime = 10
  228. if waitClickImg_withBool(check_img.auto_download, 10, 20) == True:
  229. waitTime += 200
  230. waitFindImg_withBool(place_img.gameIn, waitTime, 20)
  231. basic_operate.go_town()
  232. if waitFindImg_withBool(place_img.gameIn, waitTime, 20) == False:
  233. return False
  234. myTimeSleep_big()
  235. return isSuccess
  236. class dongri_task:
  237. def __init__(self, name):
  238. self.name = name
  239. def run(self):
  240. print(f"Running task: {self.name}")
  241. class task_fight_yongbing(dongri_task):
  242. def __init__(self, add_strengh):
  243. super().__init__("战斗佣兵")
  244. self.add_strengh = add_strengh
  245. def run(self):
  246. basic_operate.go_outside()
  247. if False == waitFindImg_withBool(monster_img.enough_strengh, 2, 1):
  248. if self.add_strengh:
  249. basic_operate.add_strength()
  250. basic_operate.go_outside()
  251. else:
  252. print("没有足够的体力了")
  253. return False
  254. if basic_operate.get_line_num() >= 6:
  255. return False
  256. if waitClickImg_noWait_withBool(check_img.yongbing, 2, 1) == False:
  257. return False
  258. waitClickImg_noWait_withBool(check_img.detect, 2, 1)
  259. if waitClickImg_noWait_withBool(check_img.yongbing_fight, 2, 1) == False:
  260. return False
  261. if waitClickImg_noWait_withBool(monster_img.line1, 2, 1) == False:
  262. return False
  263. if waitFindImg_withBool(monster_img.no_hero, 2, 1) == True:
  264. return False
  265. if waitClickImg_noWait_withBool(monster_img.all_select, 2, 1) == False:
  266. return False
  267. waitClickImg_noWait_withBool(monster_img.all_select, 2, 1)
  268. maxTryTimes = 3
  269. while maxTryTimes > 0:
  270. maxTryTimes -= 1
  271. waitClickImg_withBool([monster_img.fight, monster_img.fight2], 1, 1)
  272. waitClickImg_noWait_withBool(monster_img.all_select, 1, 1)
  273. if waitFindImg_withBool(monster_img.all_select, 1, 1) == False:
  274. break
  275. return True
  276. class task_fight_jina_only(dongri_task):
  277. def __init__(self):
  278. super().__init__("战斗召唤的吉娜")
  279. def run(self):
  280. basic_operate.go_outside()
  281. #必须加体力
  282. if False == waitFindImg_withBool(monster_img.enough_strengh, 2, 1):
  283. basic_operate.add_strength()
  284. basic_operate.go_outside()
  285. if waitClickImg_noWait_withBool((check_img.talk_in,check_img.talk_in2), 2, 1) == False:
  286. return False
  287. waitClickImg_noWait_withBool(check_img.talkin_person, 2, 1)
  288. if waitClickImg_noWait_withBool(check_img.talkin_jina, 2, 1) == False:
  289. return False
  290. myTimeSleep_big()
  291. yys_dragAuto(check_img.move_down)
  292. yys_dragAuto(check_img.move_down)
  293. myTimeSleep_big()
  294. if waitClickImg_noWait_withBool(check_img.xiaohao_jina, 2, 1) == False:
  295. return False
  296. if waitClickImg_noWait_withBool((check_img.jina_pic, check_img.jina_pic2), 2, 1) == False:
  297. return False
  298. if waitClickImg_noWait_withBool(monster_img.muti_team, 2, 1) == False:
  299. return False
  300. waitClickImg_noWait_withBool(monster_img.begin_multi, 2, 1)
  301. if waitClickImg_noWait_withBool(monster_img.line1, 2, 1) == False:
  302. return False
  303. if waitFindImg_withBool(monster_img.no_hero, 2, 1) == True:
  304. return False
  305. if waitClickImg_noWait_withBool(monster_img.all_select, 2, 1) == False:
  306. return False
  307. waitClickImg_noWait_withBool(monster_img.all_select, 2, 1)
  308. maxTryTimes = 3
  309. while maxTryTimes > 0:
  310. maxTryTimes -= 1
  311. waitClickImg_withBool([monster_img.fight, monster_img.fight2], 1, 1)
  312. waitClickImg_noWait_withBool(monster_img.all_select, 1, 1)
  313. if waitFindImg_withBool(monster_img.all_select, 1, 1) == False:
  314. break
  315. return True
  316. class task_call_jina(dongri_task):
  317. def __init__(self):
  318. super().__init__("召唤吉娜")
  319. def run(self):
  320. basic_operate.go_outside()
  321. if waitClickImg_noWait_withBool(check_img.pack, 2, 1) == False:
  322. return False
  323. if waitClickImg_noWait_withBool((check_img.other, check_img.other2), 2, 1) == False:
  324. return False
  325. if waitClickImg_noWait_withBool(check_img.jina_jiao, 2, 1) == False:
  326. return False
  327. if waitClickImg_noWait_withBool(check_img.use, 2, 1) == False:
  328. return False
  329. if waitClickImg_noWait_withBool(check_img.share, 2, 1) == False:
  330. return False
  331. if waitClickImg_noWait_withBool(check_img.to_pcacc, 2, 1) == False:
  332. return False
  333. if waitClickImg_noWait_withBool(check_img.share_btn, 2, 1) == False:
  334. return False
  335. return True
  336. class task_fight_jina(dongri_task):
  337. def __init__(self, add_strengh):
  338. super().__init__("战斗吉娜")
  339. self.add_strengh = add_strengh
  340. def run(self):
  341. basic_operate.go_outside()
  342. if False == waitFindImg_withBool(monster_img.enough_strengh, 2, 1):
  343. if self.add_strengh:
  344. basic_operate.add_strength()
  345. basic_operate.go_outside()
  346. else:
  347. print("没有足够的体力了")
  348. return False
  349. if waitClickImg_noWait_withBool(check_img.pack, 2, 1) == False:
  350. return False
  351. if waitClickImg_noWait_withBool((check_img.other, check_img.other2), 2, 1) == False:
  352. return False
  353. if waitClickImg_noWait_withBool(check_img.jina_jiao, 2, 1) == False:
  354. return False
  355. if waitClickImg_noWait_withBool(check_img.use, 2, 1) == False:
  356. return False
  357. if waitClickImg_noWait_withBool(monster_img.muti_team, 2, 1) == False:
  358. return False
  359. waitClickImg_noWait_withBool(monster_img.begin_multi, 2, 1)
  360. if waitClickImg_noWait_withBool(monster_img.line1, 2, 1) == False:
  361. return False
  362. if waitFindImg_withBool(monster_img.no_hero, 2, 1) == True:
  363. return False
  364. if waitClickImg_noWait_withBool(monster_img.all_select, 2, 1) == False:
  365. return False
  366. waitClickImg_noWait_withBool(monster_img.all_select, 2, 1)
  367. maxTryTimes = 3
  368. while maxTryTimes > 0:
  369. maxTryTimes -= 1
  370. waitClickImg_withBool([monster_img.fight, monster_img.fight2], 1, 1)
  371. waitClickImg_noWait_withBool(monster_img.all_select, 1, 1)
  372. if waitFindImg_withBool(monster_img.all_select, 1, 1) == False:
  373. break
  374. return True
  375. class task_fightMonster(dongri_task):
  376. def __init__(self, add_strengh, fight_bigMonster, isSimple):
  377. self.add_strengh = add_strengh
  378. self.isSimple = isSimple
  379. if fight_bigMonster == True:
  380. super().__init__(f"战斗大怪物")
  381. self.monster = monster_img.bigMonster
  382. self.attack = monster_img.muti_team
  383. else:
  384. super().__init__(f"战斗小怪物")
  385. self.monster = monster_img.wolf
  386. self.attack = monster_img.attack
  387. def run(self):
  388. global g_task_lineCheck
  389. now = datetime.now()
  390. target_time = datetime.combine(now.date(), dt.time(21, 00))
  391. end_time = datetime.combine(now.date(), dt.time(22, 00))
  392. # 判断当前时间是否超过20:30
  393. if now > target_time and now < end_time:
  394. print("当前时间已超过21:00,不执行操作")
  395. return False
  396. basic_operate.go_outside()
  397. if False == waitFindImg_withBool(monster_img.enough_strengh, 2, 1):
  398. if self.add_strengh:
  399. basic_operate.add_strength()
  400. basic_operate.go_outside()
  401. else:
  402. print("没有足够的体力了")
  403. return False
  404. maxLineNum = 6
  405. if basic_operate.get_line_num() >= maxLineNum:
  406. return False
  407. if False == basic_operate.click_outside_search():
  408. return False
  409. if waitFindImg_withBool(monster_img.search, 2, 1):
  410. myTimeSleep_big()
  411. yys_dragAuto(monster_img.move_left)
  412. if waitClickImg_noWait_withBool(self.monster, 2, 1) == False:
  413. return False
  414. if waitClickImg_noWait_withBool(monster_img.search, 2, 1) == False:
  415. return False
  416. if waitClickImg_noWait_withBool(self.attack, 2, 1) == False:
  417. return False
  418. waitClickImg_noWait_withBool(monster_img.begin_multi, 2, 1)
  419. if not self.isSimple:
  420. if waitClickImg_noWait_withBool(monster_img.line1, 2, 1) == False:
  421. return False
  422. if waitFindImg_withBool(monster_img.no_hero, 2, 1) == True:
  423. return False
  424. if waitClickImg_noWait_withBool(monster_img.all_select, 2, 1) == False:
  425. return False
  426. waitClickImg_noWait_withBool(monster_img.all_select, 2, 1)
  427. maxTryTimes = 3
  428. while maxTryTimes > 0:
  429. maxTryTimes -= 1
  430. waitClickImg_withBool([monster_img.fight, monster_img.fight2], 1, 1)
  431. waitClickImg_noWait_withBool(monster_img.all_select, 1, 1)
  432. if waitFindImg_withBool(monster_img.all_select, 1, 1) == False:
  433. break
  434. return True
  435. class task_collect(dongri_task):
  436. def __init__(self, type = 0, isSimple = False, isAddStrenghth = False):
  437. self.isSimple = isSimple
  438. self.isAddStrenghth = isAddStrenghth
  439. if isinstance(type, (list, tuple)):
  440. typeArr = type
  441. type = typeArr[random.randint(0, len(typeArr) - 1)]
  442. elif type == 0:
  443. typeArr = [4,3,2,1]
  444. type = typeArr[random.randint(0, len(typeArr) - 1)]
  445. elif type == 5:
  446. typeArr = [2,1]
  447. type = typeArr[random.randint(0, len(typeArr) - 1)]
  448. if type == 1:
  449. self.type = monster_img.meat
  450. self.line = monster_img.line2
  451. super().__init__(f"采集肉")
  452. elif type == 2:
  453. self.type = monster_img.wood
  454. self.line = monster_img.line3
  455. super().__init__(f"采集木头")
  456. elif type == 3:
  457. self.type = monster_img.mine
  458. self.line = monster_img.line4
  459. super().__init__(f"采矿石")
  460. elif type == 4:
  461. self.type = monster_img.iron
  462. self.line = monster_img.line5
  463. super().__init__(f"采集铁矿石")
  464. else:
  465. self.type = None
  466. self.line = None
  467. super().__init__(f"采集None")
  468. if isSimple:
  469. self.line = None
  470. def run(self):
  471. global g_task_lineCheck
  472. if self.type == None:
  473. return True
  474. basic_operate.go_outside()
  475. maxLineNum = 6
  476. if self.isAddStrenghth:
  477. maxLineNum -= 1
  478. if g_task_lineCheck:
  479. maxLineNum -= 1
  480. if basic_operate.get_line_num() >= maxLineNum:
  481. return False
  482. if False == basic_operate.click_outside_search():
  483. return False
  484. if waitFindImg_withBool(monster_img.search, 2, 1):
  485. myTimeSleep_big()
  486. yys_dragAuto(monster_img.move_right)
  487. if waitClickImg_noWait_withBool(self.type, 2, 1) == False:
  488. return False
  489. if waitClickImg_noWait_withBool(monster_img.search, 2, 1) == False:
  490. return False
  491. if waitClickImg_withBool(monster_img.collect, 2, 1) == False:
  492. return False
  493. if self.line != None:
  494. waitClickImg_noWait_withBool(self.line, 2, 1)
  495. waitClickImg_noWait_withBool(monster_img.all_select, 2, 1)
  496. maxTryTimes = 3
  497. while maxTryTimes > 0:
  498. maxTryTimes -= 1
  499. waitClickImg_withBool([monster_img.fight, monster_img.fight2], 1, 1)
  500. waitClickImg_noWait_withBool(monster_img.all_select, 1, 1)
  501. if waitFindImg_withBool(monster_img.all_select, 1, 1) == False:
  502. break
  503. return True
  504. class task_train(dongri_task):
  505. def __init__(self, train_type = None):
  506. super().__init__(f"检查训练{train_type}")
  507. self.train_type = train_type
  508. def run(self):
  509. basic_operate.go_town()
  510. if self.train_type == 'None':
  511. return True
  512. if waitClickImg_noWait_withBool(train_img.quick_panel, 2, 1) == False:
  513. return False
  514. if waitClickImg_noWait_withBool(train_img.train_success, 2, 1) == False:
  515. return False
  516. tryTimes = 3
  517. isSuccess = False
  518. while tryTimes > 0:
  519. tryTimes -= 1
  520. waitClickImg_noWait_withBool([train_img.dun, train_img.gong, train_img.mao], 2, 1)
  521. if waitClickImg_noWait_withBool(train_img.train, 2, 1):
  522. isSuccess = True
  523. break
  524. if isSuccess == False:
  525. pcacc_mouse.quickclick_current()
  526. myTimeSleep_big()
  527. pcacc_mouse.quickclick_current()
  528. if waitClickImg_noWait_withBool(train_img.train, 2, 1) == False:
  529. return False
  530. if self.train_type == 'lv1':
  531. myTimeSleep_big()
  532. yys_dragAuto(train_img.move_left)
  533. yys_dragAuto(train_img.move_left)
  534. waitClickImg_noWait_withBool(train_img.soilder_lv1, 2, 1)
  535. elif self.train_type == 'lv8':
  536. waitClickImg_noWait_withBool(train_img.soilder_lv8, 2, 1)
  537. elif self.train_type == 'lv9':
  538. waitClickImg_noWait_withBool(train_img.soilder_lv9, 2, 1)
  539. elif self.train_type == 'upgrade':
  540. waitClickImg_noWait_withBool(train_img.upgrade_small, 2, 1)
  541. waitClickImg_noWait_withBool(train_img.upgrade_big, 2, 1)
  542. return basic_operate.enter_auto_supply_resource([train_img.begin_train,train_img.begin_train2])
  543. class task_checkHelp(dongri_task):
  544. def __init__(self, isOutSide = False):
  545. super().__init__(f"检查帮助")
  546. self.isOutSide = isOutSide
  547. def run(self):
  548. if self.isOutSide:
  549. basic_operate.go_outside()
  550. else:
  551. basic_operate.go_town()
  552. waitClickImg_noWait_withBool(place_img.help, 2, 1)
  553. return True
  554. class task_gotoTree(dongri_task):
  555. def __init__(self):
  556. super().__init__(f"查看生命之树")
  557. def run(self):
  558. basic_operate.go_town()
  559. if waitClickImg_noWait_withBool(train_img.quick_panel, 2, 1) == False:
  560. return False
  561. myTimeSleep_big()
  562. yys_dragAuto(check_img.move_down)
  563. yys_dragAuto(check_img.move_down)
  564. myTimeSleep_big()
  565. if waitClickImg_noWait_withBool(check_img.life_tree, 2, 1) == False:
  566. return False
  567. myTimeSleep_big()
  568. pcacc_mouse.quickclick_current()
  569. myTimeSleep_big()
  570. waitClickImg_noWait_withBool((check_img.life_jam, check_img.life_jam2), 2, 1)
  571. waitClickImg_noWait_withBool((check_img.life_jam, check_img.life_jam2), 2, 1)
  572. return True
  573. class task_getStrength(dongri_task):
  574. def __init__(self):
  575. super().__init__(f"获取体力")
  576. def run(self):
  577. basic_operate.go_town()
  578. if waitClickImg_noWait_withBool(train_img.quick_panel, 2, 1) == False:
  579. return False
  580. if waitClickImg_noWait_withBool(check_img.pannel_research, 2, 1) == False:
  581. return False
  582. myTimeSleep_big()
  583. yys_dragAuto(change_direction(special_activity_img.champion_move))
  584. myTimeSleep_big()
  585. if waitClickImg_noWait_withBool(check_img.store_strength, 3, 1):
  586. waitClickImg_noWait_withBool((check_img.get,check_img.bigGet), 2, 1)
  587. return True
  588. class task_checkAdventure2(dongri_task):
  589. def __init__(self):
  590. super().__init__(f"检查游历")
  591. def run(self):
  592. basic_operate.go_town()
  593. if waitClickImg_noWait_withBool(train_img.quick_panel, 2, 1) == False:
  594. return False
  595. myTimeSleep_big()
  596. yys_dragAuto(check_img.move_down)
  597. yys_dragAuto(check_img.move_down)
  598. yys_dragAuto(check_img.move_down)
  599. yys_dragAuto(check_img.move_down)
  600. myTimeSleep_big()
  601. if waitClickImg_noWait_withBool(check_img.pannel_adventure, 2, 1) == False:
  602. return False
  603. if waitClickImg_noWait_withBool(check_img.adventure_random, 2, 1) == False:
  604. return False
  605. if waitClickImg_noWait_withBool(check_img.adventure_bag, 2, 1) == False:
  606. return False
  607. if waitClickImg_noWait_withBool(check_img.adventure_get, 2, 1) == False:
  608. return False
  609. return True
  610. class task_checkStoreRoom(dongri_task):
  611. def __init__(self):
  612. super().__init__(f"检查仓库或招募")
  613. def run(self):
  614. basic_operate.go_town()
  615. if waitClickImg_noWait_withBool(train_img.quick_panel, 2, 1) == False:
  616. return False
  617. myTimeSleep_big()
  618. yys_dragAuto(check_img.move_down)
  619. yys_dragAuto(check_img.move_down)
  620. myTimeSleep_big()
  621. if waitClickImg_noWait_withBool((train_img.train_success, check_img.needgo), 2, 1) == False:
  622. return False
  623. myTimeSleep_big()
  624. if waitFindImg_withBool(check_img.pet_findtreature, 2, 1) == False:# storeroom
  625. waitClickImg_noWait_withBool((check_img.bigGet, check_img.chenxi_get2), 2, 1)
  626. pcacc_mouse.quickclick_current()
  627. myTimeSleep_big()
  628. if waitClickImg_noWait_withBool((check_img.detail,check_img.detail2), 2, 1):
  629. myTimeSleep_big()
  630. basic_operate.go_town()
  631. myTimeSleep_big()
  632. if waitClickImg_noWait_withBool((check_img.storeroom, check_img.storeroom2, check_img.invite_free), 2, 1) == False:
  633. return False
  634. myTimeSleep_big()
  635. pcacc_mouse.quickclick_current()
  636. myTimeSleep_big()
  637. waitClickImg_noWait_withBool(check_img.store_strength, 2, 1)
  638. waitClickImg_noWait_withBool((check_img.get,check_img.bigGet), 2, 1)
  639. else:
  640. if waitClickImg_noWait_withBool(check_img.pet_success, 2, 1):
  641. myTimeSleep_big()
  642. dstPos = get_yys_random_point(check_img.pet_getRegion)
  643. pcacc_mouse.click(dstPos[0], dstPos[1])
  644. myTimeSleep_big()
  645. elif waitClickImg_noWait_withBool((check_img.pet_advance, check_img.pet_senior, check_img.pet_junior), 2, 1):
  646. waitClickImg_noWait_withBool(check_img.pet_gotreature, 2, 1)
  647. waitClickImg_noWait_withBool(check_img.pet_begintreature, 2, 1)
  648. return True
  649. class task_checkConfilits(dongri_task):
  650. def __init__(self):
  651. super().__init__(f"检查集结")
  652. def run(self):
  653. basic_operate.go_outside()
  654. if waitClickImg_noWait_withBool(check_img.conflits, 2, 1) == False:
  655. return False
  656. if waitClickImg_noWait_withBool(check_img.paticipate, 2, 1) == False:
  657. return False
  658. if waitFindImg_withBool(check_img.conflict_50, 2, 1) == True:
  659. waitClickImg_noWait_withBool(check_img.conflict_stop, 2, 1)
  660. return True
  661. if waitClickImg_noWait_withBool(check_img.auto_confilit, 2, 1) == False:
  662. return False
  663. return True
  664. class task_checkDonata(dongri_task):
  665. def __init__(self):
  666. super().__init__(f"检查捐献")
  667. def run(self):
  668. basic_operate.go_town()
  669. if waitClickImg_noWait_withBool(check_img.union, 2, 1) == False:
  670. return False
  671. if waitClickImg_noWait_withBool(check_img.union_technology, 2, 1) == False:
  672. return False
  673. if waitClickImg_noWait_withBool(check_img.technology_better, 2, 1) == False:
  674. return False
  675. if waitClickImg_withBool([check_img.donate, check_img.donate2], 2, 1) == False:
  676. return False
  677. else:
  678. maxTryTimes = 3
  679. while waitClickImg_withBool([check_img.donate, check_img.donate2], 1, 0) and maxTryTimes > 0:
  680. maxTryTimes -= 1
  681. return True
  682. class task_checkUnionTreasure(dongri_task):
  683. def __init__(self):
  684. super().__init__(f"检查联盟宝藏")
  685. def run(self):
  686. basic_operate.go_town()
  687. if waitClickImg_noWait_withBool(check_img.union, 2, 1) == False:
  688. return False
  689. if waitClickImg_noWait_withBool(check_img.union_treasure, 2, 1) == False:
  690. return False
  691. waitClickImg_noWait_withBool(check_img.union_gift, 2, 1)
  692. while waitClickImg_noWait_withBool((check_img.union_get), 2, 0) == True:
  693. continue
  694. waitClickImg_noWait_withBool(check_img.union_gain, 2, 1)
  695. while waitClickImg_noWait_withBool((check_img.union_get), 2, 0) == True:
  696. continue
  697. waitClickImg_noWait_withBool(check_img.union_bigtreasure, 2, 1)
  698. return True
  699. class task_checkAdventure(dongri_task):
  700. def __init__(self):
  701. super().__init__(f"检查冒险")
  702. def run(self):
  703. basic_operate.go_town()
  704. if waitClickImg_noWait_withBool(check_img.adventure, 2, 1) == False:
  705. return False
  706. if waitClickImg_noWait_withBool(check_img.get, 2, 1) == False:
  707. return False
  708. if waitClickImg_noWait_withBool(check_img.bigGet, 2, 1) == False:
  709. return False
  710. return True
  711. class task_waitTime(dongri_task):
  712. def __init__(self):
  713. super().__init__(f"等待时间")
  714. def run(self):
  715. myTimeSleep(300)
  716. class task_check_Research(dongri_task):
  717. def __init__(self):
  718. super().__init__(f"检查研究")
  719. def run(self):
  720. basic_operate.go_town()
  721. if waitClickImg_noWait_withBool(train_img.quick_panel, 2, 1) == False:
  722. return False
  723. if waitClickImg_noWait_withBool(check_img.pannel_research, 2, 1) == False:
  724. return False
  725. handRet, handPos = waitFindImg(check_img.hand, 2, 1)
  726. if not handRet:
  727. return False
  728. detailRet, detailPos = waitFindImg((check_img.detail,check_img.detail2), 2, 1)
  729. dstPos = [0, 0]
  730. if not detailRet:
  731. # 如果找不到详细信息,兵营之类的,需点中间
  732. dstPos = [handPos[0] - 70, handPos[1] + 120]
  733. else:
  734. dstPos = [detailPos[0] + 70, detailPos[1] - 100]
  735. tryTimes = 3
  736. while tryTimes > 0:
  737. tryTimes -= 1
  738. myTimeSleep_big()
  739. pcacc_mouse.click(dst_x=dstPos[0], dst_y=dstPos[1])
  740. if waitClickImg_noWait_withBool(check_img.research, 2, 1):
  741. break
  742. if waitFindImg_withBool(check_img.research_speedup, 2, 1) == True:
  743. return False
  744. if waitClickImg_withBool([check_img.research_from0, check_img.research_from1, check_img.research_from2, check_img.research_from3, check_img.research_from4], 2, 1) == False:
  745. return False
  746. if basic_operate.enter_auto_supply_resource(check_img.research_done) == False:
  747. return False
  748. waitClickImg_withBool([check_img.help, check_img.help2, check_img.help3], 2, 2)
  749. class check_buildOrResearch(dongri_task):
  750. def __init__(self):
  751. super().__init__(f"检查建筑或研究")
  752. def run(self):
  753. basic_operate.go_town()
  754. if waitClickImg_noWait_withBool(train_img.quick_panel, 2, 1) == False:
  755. return False
  756. if waitClickImg_noWait_withBool(check_img.needgo, 2, 1) == False:
  757. return False
  758. dstType = 'none'
  759. while True:
  760. if waitFindImg_withBool([check_img.upgrade_done, check_img.upgrade_done2, check_img.upgrade_done3, check_img.upgrade_next, check_img.upgrade_done4], 2, 1):
  761. dstType = 'build'
  762. break
  763. handRet, handPos = waitFindImg(check_img.hand, 2, 1)
  764. if not handRet:
  765. return False
  766. detailRet, detailPos = waitFindImg((check_img.detail,check_img.detail2), 2, 1)
  767. dstPos = [0, 0]
  768. if not detailRet:
  769. # 如果找不到详细信息,兵营之类的,需点中间
  770. dstPos = [handPos[0] - 70, handPos[1] + 120]
  771. else:
  772. dstPos = [detailPos[0] + 70, detailPos[1] - 100]
  773. tryTimes = 5
  774. while tryTimes > 0:
  775. tryTimes -= 1
  776. myTimeSleep_big()
  777. pcacc_mouse.click(dst_x=dstPos[0], dst_y=dstPos[1])
  778. if waitClickImg_noWait_withBool(check_img.research, 2, 1):
  779. dstType = 'research'
  780. break
  781. elif waitClickImg_noWait_withBool(check_img.build_upgrade, 2, 1):
  782. dstType = 'build'
  783. break
  784. break
  785. if dstType == 'none':
  786. print('没有找到建筑或研究')
  787. return False
  788. elif dstType == 'build':
  789. buildtimes = 4
  790. while basic_operate.enter_auto_supply_resource([check_img.upgrade_done, check_img.upgrade_done2, check_img.upgrade_done3, check_img.upgrade_next, check_img.upgrade_done4]):
  791. buildtimes -= 1
  792. if buildtimes == 0:
  793. break
  794. continue
  795. elif dstType == 'research':
  796. if waitClickImg_withBool([check_img.research_type1, check_img.research_type2], 2, 1) == False:
  797. return False
  798. if basic_operate.enter_auto_supply_resource(check_img.research_done) == False:
  799. return False
  800. waitClickImg_withBool([check_img.help, check_img.help2, check_img.help3], 2, 2)
  801. return True
  802. class task_information(dongri_task):
  803. def __init__(self, isAddStrengh = False):
  804. super().__init__(f"检查情报")
  805. self.isAddStrengh = isAddStrengh
  806. def run(self):
  807. basic_operate.go_outside()
  808. if waitClickImg_noWait_withBool(information_img.information, 1, 1) == False:
  809. return False
  810. waitClickImg_noWait_withBool(information_img.information_suc, 1, 1)
  811. hero_arr = [information_img.hero0, information_img.hero1, information_img.hero2, information_img.hero3, information_img.hero4]
  812. camp_arr = [information_img.camp1, information_img.camp2, information_img.camp3, information_img.camp4]
  813. wolf_arr = [information_img.wolf0, information_img.wolf1, information_img.wolf2, information_img.wolf3, information_img.wolf4, information_img.huojing1]
  814. total_arr = hero_arr + camp_arr + wolf_arr
  815. if waitFindImg_withBool(total_arr, 2, 1) == False:
  816. return False
  817. if waitClickImg_noWait_withBool(hero_arr, 0.5, 0.5):
  818. if waitClickImg_noWait_withBool(information_img.gotosee, 1, 1) == False:
  819. return False
  820. if waitClickImg_noWait_withBool(information_img.explore, 1, 1) == False:
  821. return False
  822. if waitClickImg_noWait_withBool(information_img.hero_fight, 1, 1) == False:
  823. return False
  824. myTimeSleep_big()
  825. return True
  826. elif waitClickImg_noWait_withBool(camp_arr, 0.5, 0.5):
  827. if waitClickImg_noWait_withBool(information_img.gotosee, 1, 1) == False:
  828. return False
  829. if waitClickImg_noWait_withBool(information_img.survive, 1, 1) == False:
  830. return False
  831. return True
  832. elif waitClickImg_noWait_withBool(wolf_arr, 0.5, 0.5):
  833. if waitClickImg_noWait_withBool(information_img.gotosee, 1, 1) == False:
  834. return False
  835. if waitClickImg_noWait_withBool(information_img.fight, 1, 1) == False:
  836. return False
  837. if waitClickImg_noWait_withBool(monster_img.line1, 1, 1) == False:
  838. return False
  839. if waitClickImg_noWait_withBool(monster_img.all_select, 2, 1) == False:
  840. return False
  841. waitClickImg_noWait_withBool(monster_img.all_select, 0.1, 1)
  842. maxTryTimes = 3
  843. while maxTryTimes > 0:
  844. maxTryTimes -= 1
  845. waitClickImg_withBool([monster_img.fight, monster_img.fight2], 1, 1)
  846. if False == waitClickImg_noWait_withBool(monster_img.all_select, 1, 1):
  847. break
  848. return True
  849. else:
  850. return False
  851. class task_returnAllLine(dongri_task):
  852. def __init__(self):
  853. super().__init__(f"返回所有路线")
  854. def run(self):
  855. basic_operate.go_town()
  856. basic_operate.go_outside()
  857. maxTryTimes = 6
  858. while maxTryTimes > 0:
  859. maxTryTimes -= 1
  860. if basic_operate.return_line() == False:
  861. break
  862. return True
  863. class task_paticipateInTeam2(dongri_task):
  864. def __init__(self, checkPower=True):
  865. typeArr = [1,3,4]
  866. type = typeArr[random.randint(0, len(typeArr) - 1)]
  867. if type == 1:
  868. self.line = monster_img.line1
  869. elif type == 2:
  870. self.line = monster_img.line2
  871. elif type == 3:
  872. self.line = monster_img.line3
  873. elif type == 4:
  874. self.line = monster_img.line4
  875. self.checkPower = checkPower
  876. hint = "&检查实力"
  877. if checkPower == False:
  878. hint = "&不检查"
  879. super().__init__(f"union队伍{type}{hint}")
  880. def run(self):
  881. basic_operate.go_outside()
  882. if waitClickImg_noWait_withBool((check_img.talk_in,check_img.talk_in2, check_img.talk_in3), 2, 1) == False:
  883. return False
  884. waitClickImg_noWait_withBool(check_img.talkin_union, 1, 0)
  885. if waitClickImg_noWait_withBool(check_img.bear_team, 1, 1, True) == False:
  886. return False
  887. if waitClickImg_noWait_withBool(check_img.bear_add, 1, 1) == False:
  888. return False
  889. waitClickImg_noWait_withBool(self.line, 0.1, 1)
  890. if waitFindImg_withBool(special_activity_img.power0, 0.1, 0) == False:# 实力不为0
  891. if self.checkPower:
  892. if waitFindImg_withBool(check_img.enough_soilder, 1, 0) == False:
  893. return False
  894. waitClickImg_withBool([monster_img.fight, monster_img.fight2, monster_img.fight3], 1, 0)
  895. return True
  896. return False
  897. class task_paticipateInTeam(dongri_task):
  898. def __init__(self, checkPower=True):
  899. typeArr = [1,3,4]
  900. type = typeArr[random.randint(0, len(typeArr) - 1)]
  901. if type == 1:
  902. self.line = monster_img.line1
  903. elif type == 2:
  904. self.line = monster_img.line2
  905. elif type == 3:
  906. self.line = monster_img.line3
  907. elif type == 4:
  908. self.line = monster_img.line4
  909. self.checkPower = checkPower
  910. hint = "&检查实力"
  911. if checkPower == False:
  912. hint = "&不检查"
  913. super().__init__(f"参与队伍{type}{hint}")
  914. def run(self):
  915. basic_operate.go_outside()
  916. if waitClickImg_noWait_withBool(check_img.conflits, 2, 1) == False:
  917. return False
  918. myTimeSleep_big()
  919. dragTimes = 5
  920. for i in range(dragTimes):
  921. yys_dragAuto(check_img.move_down_big, True)
  922. myTimeSleep(0.02)
  923. myTimeSleep_small()
  924. ret = False
  925. for i in range(dragTimes*2):
  926. ret = waitClickImg_noWait_withBool(monster_img.participate, 1, 0, True)
  927. if ret == True:
  928. break
  929. else:
  930. yys_dragAuto(check_img.move_down_big, True)
  931. myTimeSleep_small()
  932. if ret == False:
  933. return False
  934. waitClickImg_noWait_withBool(self.line, 0.1, 1)
  935. if waitFindImg_withBool(special_activity_img.power0, 0.1, 0) == False:# 实力不为0
  936. if self.checkPower:
  937. if waitFindImg_withBool(check_img.enough_soilder, 1, 0) == False:
  938. return False
  939. waitClickImg_withBool([monster_img.fight, monster_img.fight2, monster_img.fight3], 1, 0)
  940. if waitFindImg_withBool(check_img.auto_confilit, 2, 0) == False:
  941. return False
  942. return True
  943. class task_cure(dongri_task):
  944. def __init__(self, continueCure = False, cureNum = None):
  945. cureStr = ""
  946. if continueCure:
  947. cureStr = f"连续"
  948. super().__init__(f"{cureStr}治疗{cureNum}")
  949. self.continueCure = continueCure
  950. self.cureNum = cureNum
  951. def run(self):
  952. basic_operate.go_town()
  953. basic_operate.go_outside()
  954. if waitClickImg_noWait_withBool([check_img.already_cure,check_img.cure_help], 2, 1) == True:
  955. if waitClickImg_noWait_withBool(check_img.cancel_cure, 2, 1) == False:
  956. return False
  957. if waitClickImg_noWait_withBool(check_img.visit_enter, 2, 1) == False:
  958. return False
  959. elif waitClickImg_noWait_withBool(check_img.soilder_cure, 2, 1) == False:
  960. return False
  961. myTimeSleep(5)
  962. while waitFindImg_withBool(special_activity_img.done_immediately, 1, 0.5) == False:
  963. if waitClickImg_noWait_withBool(special_activity_img.quick_choose, 1, 0.5) == False:
  964. return False
  965. while waitFindImg_withBool(special_activity_img.done_immediately, 1, 0.5):
  966. if waitClickImg_noWait_withBool(special_activity_img.choose_zero, 1, 0.5) == False:
  967. return False
  968. else:
  969. myTimeSleep_big()
  970. pcacc_mouse.input_string(str(self.cureNum))
  971. if self.continueCure == False:
  972. if waitClickImg_noWait_withBool(check_img.cure, 2, 1) == False:
  973. return False
  974. if waitClickImg_noWait_withBool(check_img.help4, 2, 1) == False:
  975. return False
  976. else:
  977. maxCureSoilder = 50000
  978. maxTryTimes = int(maxCureSoilder) // int(self.cureNum) * 2
  979. while waitClickImg_noWait_withBool((check_img.cure, check_img.help4, check_img.help5), 10, 0.2) and maxTryTimes >= 0:
  980. maxTryTimes -= 1
  981. continue
  982. waitClickImg_noWait_withBool((check_img.help4, check_img.help5), 1, 1)
  983. return True
  984. class task_useAnnimalSkill(dongri_task):
  985. def __init__(self, isFight = False):
  986. self.isFight = isFight
  987. super().__init__(f"使用动物技能")
  988. def run(self):
  989. basic_operate.go_outside()
  990. if waitClickImg_noWait_withBool(check_img.annimal_skill, 2, 1) == False:
  991. return False
  992. research_skill = [check_img.wolf_skill, check_img.elephant_skill, check_img.lu_skill]
  993. fight_skill = [check_img.fightWolf_skill, check_img.bird_skill, check_img.bear_skill, check_img.lion_skill, check_img.tiger_skill, check_img.unicow_skill]
  994. if self.isFight == False:
  995. if waitClickImg_noWait_withBool(research_skill, 2, 1) == False:
  996. return False
  997. else:
  998. if waitClickImg_noWait_withBool(fight_skill, 2, 1) == False:
  999. return False
  1000. if waitClickImg_noWait_withBool((check_img.use, check_img.use2), 2, 1) == False:
  1001. return False
  1002. class task_activity_lianmeng(dongri_task):
  1003. def __init__(self):
  1004. super().__init__(f"联盟总动员")
  1005. def run(self):
  1006. basic_operate.go_town()
  1007. myTimeSleep_big()
  1008. if waitClickImg_noWait_withBool(special_activity_img.normal, 1, 0.5) == False:
  1009. return False
  1010. lianmeng_arr = [special_activity_img.lianmeng, special_activity_img.lianmeng2, special_activity_img.lianmeng3]
  1011. while waitClickImg_noWait_withBool(lianmeng_arr, 1, 0.5) == False:
  1012. yys_dragAuto(special_activity_img.move_left)
  1013. myTimeSleep_small()
  1014. if waitClickImg_noWait_withBool(lianmeng_arr, 1, 0.5) == True:
  1015. break
  1016. yys_dragAuto(special_activity_img.move_left)
  1017. myTimeSleep_small()
  1018. if waitClickImg_noWait_withBool(lianmeng_arr, 1, 0.5) == True:
  1019. break
  1020. yys_dragAuto(special_activity_img.move_right_little)
  1021. myTimeSleep_small()
  1022. if waitClickImg_noWait_withBool(lianmeng_arr, 1, 0.5) == True:
  1023. break
  1024. yys_dragAuto(special_activity_img.move_right_little)
  1025. myTimeSleep_small()
  1026. if waitClickImg_noWait_withBool(lianmeng_arr, 1, 0.5) == True:
  1027. break
  1028. return False
  1029. doTask_arr = [special_activity_img.shili_120_2, special_activity_img.shili_860_2, special_activity_img.shili_430, special_activity_img.bigMonster_2]
  1030. waitClickImg_noWait_withBool(special_activity_img.task_done, 1, 0.5)
  1031. if waitFindImg_withBool(special_activity_img.doing_task, 1, 0.5) == False:
  1032. down_tryTimes = 3
  1033. while down_tryTimes > 0:
  1034. down_tryTimes -= 1
  1035. if waitClickImg_noWait_withBool(doTask_arr, 1, 0.5, True) == True:
  1036. if waitClickImg_noWait_withBool(special_activity_img.accept_task, 2, 1) == False:
  1037. return False
  1038. break
  1039. elif waitFindImg_withBool(special_activity_img.shili_2, 1, 0.5) == True:
  1040. save_game_screen("shili")
  1041. yys_dragAuto(special_activity_img.move_down)
  1042. up_tryTimes = 5
  1043. while up_tryTimes > 0:
  1044. up_tryTimes -= 1
  1045. myTimeSleep_small()
  1046. yys_dragAuto(change_direction(special_activity_img.move_down))
  1047. if waitFindImg_withBool((special_activity_img.shili_120, special_activity_img.shili_860_2), 2, 1, True) == False:
  1048. maxTryTimes = 2
  1049. while waitClickImg_noWait_withBool((special_activity_img.owning2), 2, 1) == True:
  1050. waitClickImg_noWait_withBool(special_activity_img.refresh_task, 2, 1)
  1051. waitClickImg_noWait_withBool(special_activity_img.refresh, 2, 1)
  1052. maxTryTimes -= 1
  1053. if maxTryTimes <= 0:
  1054. break
  1055. return True
  1056. class task_checkMaster(dongri_task):
  1057. def __init__(self):
  1058. super().__init__(f"检查统帅")
  1059. def run(self):
  1060. basic_operate.go_town()
  1061. if waitClickImg_noWait_withBool(check_img.master, 2, 1) == False:
  1062. return False
  1063. if waitClickImg_noWait_withBool(check_img.master_get, 2, 1) == False:
  1064. return False
  1065. myTimeSleep_big()
  1066. pcacc_mouse.quickclick_current()
  1067. if waitClickImg_noWait_withBool(check_img.little_treasure, 2, 1) == False:
  1068. return False
  1069. return True
  1070. class task_checkActivities(dongri_task):
  1071. def __init__(self):
  1072. super().__init__(f"检查各种活动时间")
  1073. def find_all_matching_events(self, parts, input_word):
  1074. results = []
  1075. # 查找所有包含输入关键词的项
  1076. matches = [i for i, part in enumerate(parts) if input_word in part]
  1077. for match_index in matches:
  1078. # 从匹配项开始向后查找第一个时间或状态
  1079. for i in range(match_index + 1, len(parts)):
  1080. current_part = parts[i]
  1081. # 检查是否是时间(如 19:30)或状态(如 已结束)
  1082. if re.match(r'^\d{1,2}:\d{2}$', current_part) or current_part in ["已结束"]:
  1083. dst = {"item":parts[match_index], "time":current_part}
  1084. results.append(dst)
  1085. break # 找到第一个匹配就停止
  1086. return results
  1087. def run(self):
  1088. global todo_msg, todo_list
  1089. basic_operate.go_outside()
  1090. if waitClickImg_noWait_withBool(check_img.activity_open, 2, 1) == False:
  1091. return False
  1092. if waitFindImg_withBool(check_img.todoList, 2, 0) == False:
  1093. return False
  1094. myTimeSleep_small()
  1095. yys_dragAuto(check_img.move_down)
  1096. yys_dragAuto(check_img.move_down)
  1097. myTimeSleep_small()
  1098. activityStr = yys_ocrAuto(check_img.todo_region)
  1099. if activityStr:
  1100. todo_msg = activityStr
  1101. print(todo_msg)
  1102. date_pattern = r"\d{4}-\d{2}-\d{2}"
  1103. for i, item in enumerate(todo_msg):
  1104. if re.fullmatch(date_pattern, item): # 检查是否完全匹配日期格式
  1105. activityStr = todo_msg[:i] # 保留日期之前的内容
  1106. break
  1107. else:
  1108. activityStr = todo_msg # 如果没有找到日期,保留全部
  1109. print("去掉日期",activityStr)
  1110. result = []
  1111. judianArr = self.find_all_matching_events(activityStr, "据点")
  1112. #result.extend(judianArr)
  1113. baoleiArr = self.find_all_matching_events(activityStr, "堡垒")
  1114. #result.extend(baoleiArr)
  1115. juxiongArr = self.find_all_matching_events(activityStr, "巨熊")
  1116. result.extend(juxiongArr)
  1117. binggongchangArr = self.find_all_matching_events(activityStr, "兵工厂")
  1118. result.extend(binggongchangArr)
  1119. yaosaiArr = self.find_all_matching_events(activityStr, "要塞")
  1120. #result.extend(yaosaiArr)
  1121. todo_list = result
  1122. print(todo_list)
  1123. print(get_todo_time("巨熊行动"))
  1124. return activityStr
  1125. class task_visit_island(dongri_task):
  1126. def __init__(self):
  1127. super().__init__(f"访问岛屿")
  1128. def run(self):
  1129. basic_operate.go_outside()
  1130. if waitClickImg_noWait_withBool(check_img.visit_island_small, 2, 1) == False:
  1131. return False
  1132. if waitClickImg_noWait_withBool(check_img.visit_enter, 2, 1) == False:
  1133. return False
  1134. if waitClickImg_noWait_withBool(check_img.visit_island_big, 2, 1) == False:
  1135. return False
  1136. return True
  1137. class task_fight_ranshuang(dongri_task):
  1138. def __init__(self):
  1139. super().__init__(f"打燃霜")
  1140. def run(self):
  1141. basic_operate.backToGame()
  1142. while True:
  1143. if waitClickImg_noWait_withBool(monster_img.ranshuang_search, 0.5, 0.5) == False:
  1144. return False
  1145. if waitClickImg_noWait_withBool(monster_img.ranshuang_attack, 0.5, 0.5) == False:
  1146. firstPos = get_yys_random_point(special_activity_img.mid_enemy_region)
  1147. pcacc_mouse.click(firstPos[0], firstPos[1])
  1148. myTimeSleep_big()
  1149. if waitClickImg_noWait_withBool(monster_img.ranshuang_attack, 1, 0.5) == False:
  1150. break
  1151. break
  1152. if waitClickImg_noWait_withBool([monster_img.fight, monster_img.fight2], 1, 0.5) == False:
  1153. return False
  1154. return True
  1155. class task_fight_enemy(dongri_task):
  1156. def __init__(self):
  1157. super().__init__(f"打敌人or王城")
  1158. def run(self):
  1159. basic_operate.go_town()
  1160. basic_operate.go_outside()
  1161. if waitClickImg_noWait_withBool(special_activity_img.collection, 2, 1) == False:
  1162. return False
  1163. if waitClickImg_noWait_withBool(special_activity_img.enemy, 2, 1) == False:
  1164. return False
  1165. attackArr = [monster_img.attack, monster_img.attack2, monster_img.ranshuang_attack, monster_img.outside_attack, monster_img.defend]
  1166. myTimeSleep_big()
  1167. firstPos = get_yys_random_point(special_activity_img.first_enemy_region)
  1168. pcacc_mouse.click(firstPos[0], firstPos[1])
  1169. maxTryTimes = 5
  1170. if waitFindImg_withBool(special_activity_img.visit_island, 1, 1) == True:
  1171. return False
  1172. while waitFindImg_withBool(attackArr, 1, 0) == False and maxTryTimes > 0:
  1173. if waitClickImg_noWait_withBool(special_activity_img.outside_soilder, 1, 1) == True:
  1174. break
  1175. #if waitFindImg_withBool(special_activity_img.outside_pcacc, 1, 1) == True:
  1176. # break
  1177. #else:
  1178. # return False
  1179. maxTryTimes -= 1
  1180. myTimeSleep_big()
  1181. mid_enemy_pos = get_yys_random_point(special_activity_img.mid_enemy_region)
  1182. pcacc_mouse.click(mid_enemy_pos[0], mid_enemy_pos[1])
  1183. myTimeSleep_big()
  1184. if waitFindImg_withBool(special_activity_img.visit_island, 1, 1) == True:
  1185. return False
  1186. if waitClickImg_noWait_withBool(attackArr, 1, 0) == False:
  1187. return False
  1188. waitClickImg_noWait_withBool(monster_img.team_go, 2, 1)#派遣队伍
  1189. if waitClickImg_noWait_withBool(monster_img.line1, 2, 1) == False:
  1190. return False
  1191. if waitClickImg_noWait_withBool([monster_img.fight, monster_img.fight2], 2, 1) == False:
  1192. return False
  1193. return True
  1194. class task_get_redPackage(dongri_task):
  1195. def __init__(self):
  1196. super().__init__(f"领取红包")
  1197. def run(self):
  1198. basic_operate.go_outside()
  1199. if waitClickImg_noWait_withBool((check_img.talk_in,check_img.talk_in2, check_img.talk_in3), 2, 1) == False:
  1200. return False
  1201. waitClickImg_noWait_withBool(check_img.talkin_world, 2, 1)
  1202. oldTime = time.time()
  1203. max_waitTime = get_nextTaskTime()
  1204. print(f"max_waitTime:{max_waitTime}")
  1205. if max_waitTime == 0:
  1206. max_waitTime = 150
  1207. red_package_pics = [special_activity_img.red_package, special_activity_img.red_package2, special_activity_img.red_package3, special_activity_img.msg_new, special_activity_img.red_package_open]
  1208. runTimes = 0
  1209. while True:
  1210. if time.time() - oldTime > max_waitTime:
  1211. break
  1212. if runTimes % 10 == 0:
  1213. if waitFindImg_withBool([special_activity_img.red_package_end, special_activity_img.red_package_end2], 1, 0) == True:
  1214. waitClickImg_noWait_withBool(special_activity_img.red_package_close, 2, 0)
  1215. myTimeSleep_small()
  1216. yys_dragAuto(special_activity_img.move_down)
  1217. if True == waitClickImg_noWait_withBool(red_package_pics, 2, 0):
  1218. start_screenshot_thread("redPackage")
  1219. max_waitTime += 5
  1220. runTimes += 1
  1221. return True
  1222. class task_read_mails(dongri_task):
  1223. def __init__(self):
  1224. super().__init__(f"读邮件")
  1225. def run(self):
  1226. basic_operate.go_town()
  1227. if waitClickImg_noWait_withBool(check_img.mail_btn, 2, 1) == False:
  1228. return False
  1229. waitClickImg_noWait_withBool(check_img.mail_collect, 2, 1)
  1230. if waitClickImg_noWait_withBool(check_img.mail_union, 2, 1) == False:
  1231. return False
  1232. if waitClickImg_noWait_withBool(check_img.mail_read, 2, 1) == False:
  1233. return False
  1234. if waitClickImg_noWait_withBool(check_img.mail_system, 2, 1) == False:
  1235. return False
  1236. if waitClickImg_noWait_withBool(check_img.mail_read, 2, 1) == False:
  1237. return False
  1238. if waitClickImg_noWait_withBool(check_img.mail_reports, 2, 1) == False:
  1239. return False
  1240. if waitClickImg_noWait_withBool(check_img.mail_read, 2, 1) == False:
  1241. return False
  1242. return True
  1243. class task_checkBenifitStatus(dongri_task):
  1244. def __init__(self):
  1245. super().__init__(f"查看增益状态")
  1246. def run(self):
  1247. basic_operate.go_town()
  1248. if waitFindImg_withBool(check_img.benefit_collect, 2, 1) == True:
  1249. return True
  1250. if waitClickImg_noWait_withBool(check_img.add_benefit, 2, 1) == False:
  1251. return False
  1252. waitClickImg_noWait_withBool(check_img.benefit_evolve, 2, 1)
  1253. if waitClickImg_noWait_withBool(check_img.benefit_collect_info, 2, 1) == False:
  1254. return False
  1255. myTimeSleep_big()
  1256. dstPos = get_yys_random_point(check_img.benefit_use_region)
  1257. pcacc_mouse.click(dstPos[0], dstPos[1])
  1258. myTimeSleep_big()
  1259. if waitClickImg_noWait_withBool(check_img.benefit_buy, 2, 1) == False:
  1260. return False
  1261. waitClickImg_noWait_withBool(check_img.buy_enter, 2, 1)
  1262. return True
  1263. class task_checkDiamond(dongri_task):
  1264. def __init__(self):
  1265. super().__init__(f"查看钻石活动")
  1266. def run(self):
  1267. basic_operate.go_town()
  1268. if waitClickImg_noWait_withBool(check_img.worthy_activity, 2, 1) == False:
  1269. return False
  1270. myTimeSleep_big()
  1271. yys_dragAuto(change_direction(special_activity_img.move_left))
  1272. myTimeSleep_big()
  1273. yys_dragAuto(change_direction(special_activity_img.move_left))
  1274. myTimeSleep_big()
  1275. yys_dragAuto(change_direction(special_activity_img.move_left))
  1276. if waitClickImg_noWait_withBool(check_img.diamond_activity, 2, 1) == False:
  1277. return False
  1278. waitClickImg_noWait_withBool(check_img.gain_diamond, 2, 1)
  1279. dstPos = get_yys_random_point(check_img.diamond_save)
  1280. pcacc_mouse.click(dstPos[0], dstPos[1])
  1281. myTimeSleep_big()
  1282. dstPos = get_yys_random_point(check_img.diamond_saveMax)
  1283. pcacc_mouse.click(dstPos[0], dstPos[1])
  1284. myTimeSleep_big()
  1285. if waitClickImg_noWait_withBool(check_img.diamond_save_btn, 2, 1) == False:
  1286. return False
  1287. return True
  1288. class task_fight_campion(dongri_task):
  1289. def __init__(self):
  1290. super().__init__(f"打竞技场")
  1291. def run(self):
  1292. basic_operate.go_town()
  1293. if waitClickImg_noWait_withBool(train_img.quick_panel, 2, 1) == False:
  1294. return False
  1295. myTimeSleep_big()
  1296. if waitClickImg_noWait_withBool(special_activity_img.goto_arrow, 2, 1) == False:
  1297. return False
  1298. myTimeSleep_big()
  1299. maxMoveTimes = 2
  1300. while maxMoveTimes > 0:
  1301. maxMoveTimes -= 1
  1302. yys_dragAuto(special_activity_img.champion_move)
  1303. myTimeSleep_big()
  1304. if waitClickImg_noWait_withBool(special_activity_img.enter_champion, 2, 1) == True:
  1305. break
  1306. if waitClickImg_noWait_withBool(special_activity_img.champion_fight, 2, 1) == False:
  1307. return False
  1308. myTimeSleep_big()
  1309. dstPos = get_yys_random_point(special_activity_img.fight_last)
  1310. pcacc_mouse.click(dstPos[0], dstPos[1])
  1311. myTimeSleep_big()
  1312. if waitClickImg_noWait_withBool(special_activity_img.champion_fight2, 2, 1) == False:
  1313. return False
  1314. return True
  1315. class check_safe_collect(dongri_task):
  1316. def __init__(self):
  1317. super().__init__(f"检查安全收集")
  1318. def run(self):
  1319. basic_operate.go_outside()
  1320. if waitClickImg_noWait_withBool(special_activity_img.collection, 2, 1) == False:
  1321. return False
  1322. if waitClickImg_noWait_withBool(special_activity_img.collection_friend, 2, 1) == False:
  1323. return False
  1324. myTimeSleep_big()
  1325. firstPos = get_yys_random_point(special_activity_img.first_enemy_region)
  1326. pcacc_mouse.click(firstPos[0], firstPos[1])
  1327. maxTryTimes = 2
  1328. while waitClickImg_noWait_withBool(monster_img.collect, 1, 1) == False and maxTryTimes > 0:
  1329. maxTryTimes -= 1
  1330. myTimeSleep_big()
  1331. mid_enemy_pos = get_yys_random_point(special_activity_img.mid_enemy_region)
  1332. pcacc_mouse.click(mid_enemy_pos[0], mid_enemy_pos[1]-40)
  1333. myTimeSleep_big()
  1334. if waitClickImg_noWait_withBool(special_activity_img.big_collect, 2, 1) == False:
  1335. return False
  1336. if waitClickImg_noWait_withBool(monster_img.line7, 2, 1) == False:
  1337. return False
  1338. maxTryTimes = 3
  1339. while maxTryTimes > 0:
  1340. maxTryTimes -= 1
  1341. waitClickImg_withBool([monster_img.fight, monster_img.fight2], 1, 1)
  1342. waitClickImg_noWait_withBool(monster_img.all_select, 1, 1)
  1343. if waitFindImg_withBool(monster_img.all_select, 1, 1) == False:
  1344. break
  1345. return True
  1346. class task_duanwu(dongri_task):
  1347. def __init__(self):
  1348. super().__init__(f"端午")
  1349. def run(self):
  1350. count = 0
  1351. while True:
  1352. if count > 15000:
  1353. waitClickImg_noWait_withBool(special_activity_img.duanwu_auto_attack, 2, 1)
  1354. waitClickImg_noWait_withBool(special_activity_img.duanwu_auto_use, 2, 1)
  1355. else:
  1356. waitClickImg_noWait_withBool(special_activity_img.duanwu_end, 2, 1)
  1357. countStr = yys_ocrAuto(special_activity_img.orc_count)
  1358. print(countStr)
  1359. if len(countStr) == 0:
  1360. count = 0
  1361. continue
  1362. cleaned_text = countStr[0].replace('.', '')
  1363. cleaned_text = cleaned_text.replace(',', '')
  1364. try:
  1365. count = int(cleaned_text)
  1366. except:
  1367. continue
  1368. print("current count:", count)
  1369. return True
  1370. class task_checkPower(dongri_task):
  1371. def __init__(self):
  1372. super().__init__(f"检查实力")
  1373. def run(self):
  1374. countStr = yys_ocrAuto(special_activity_img.orc_power2)
  1375. if len(countStr) == 0:
  1376. count = 0
  1377. return 0
  1378. cleaned_text = countStr[0].replace('.', '')
  1379. cleaned_text = cleaned_text.replace(',', '')
  1380. try:
  1381. count = int(cleaned_text)
  1382. except:
  1383. return False
  1384. print("current count:", count)
  1385. return count
  1386. class task_get_fire_crystal(dongri_task):
  1387. def __init__(self):
  1388. super().__init__(f"获取火晶")
  1389. def run(self):
  1390. basic_operate.go_town()
  1391. if waitClickImg_noWait_withBool(train_img.quick_panel, 2, 1) == False:
  1392. return False
  1393. myTimeSleep_big()
  1394. if waitClickImg_noWait_withBool(special_activity_img.spear, 2, 1) == False:
  1395. return False
  1396. if waitClickImg_noWait_withBool(special_activity_img.build_fire_crystal, 2, 1) == False:
  1397. return False
  1398. while waitClickImg_noWait_withBool(special_activity_img.fire_crystal_get, 2, 1, True) == True:
  1399. continue
  1400. return True
  1401. class task_zhuguang(dongri_task):
  1402. def __init__(self):
  1403. super().__init__(f"检查逐光")
  1404. def run(self):
  1405. basic_operate.go_town()
  1406. if waitClickImg_noWait_withBool(check_img.worthy_activity, 2, 1) == False:
  1407. return False
  1408. myTimeSleep_big()
  1409. yys_dragAuto(change_direction(special_activity_img.move_right_little))
  1410. myTimeSleep_big()
  1411. yys_dragAuto(change_direction(special_activity_img.move_right_little))
  1412. myTimeSleep_big()
  1413. yys_dragAuto(change_direction(special_activity_img.move_right_little))
  1414. waitClickImg_noWait_withBool([special_activity_img.zhuguang_not_select, special_activity_img.zhuguang_select], 2, 1)
  1415. waitClickImg_noWait_withBool([special_activity_img.zhuguang_send, special_activity_img.zhuguang_receive], 2, 1)
  1416. waitClickImg_noWait_withBool([special_activity_img.zhuguang_send, special_activity_img.zhuguang_receive], 2, 1)
  1417. return True
  1418. class task_testFun(dongri_task):
  1419. def __init__(self):
  1420. super().__init__(f"测试功能")
  1421. def run(self):
  1422. #task_checkDiamond().run()
  1423. task_paticipateInTeam2().run()
  1424. return True
  1425. if __name__ == '__main__':
  1426. myTimeSleep_big()
  1427. #print(basic_operate.get_line_num())
  1428. #task_get_fire_crystal().run()
  1429. #task_checkPower().run()
  1430. #task_testFun().run()
  1431. #task_checkActivities().run()
  1432. #print(get_todo_time("巨熊行动"))
  1433. #task_check_Research().run()
  1434. #save_game_screen()
  1435. #basic_operate.get_line_num()
  1436. #task_cure(True, 85).run()
  1437. #task_fight_enemy().run()
  1438. #task_fight_ranshuang().run()
  1439. #task_gotoTree().run()
  1440. #task_fight_jina_only().run()
  1441. #task_checkConfilits().run()
  1442. #task_getStrength().run()
  1443. #task_checkActivities().run()
  1444. #task_checkMaster().run()
  1445. #basic_operate.get_line_num()
  1446. #yys_ocrAuto(check_img.line_orc)
  1447. #basic_operate.go_town()
  1448. #basic_operate.add_strength()
  1449. #task_fightMonster(False, True,False).run()
  1450. #task_checkHelp().run()
  1451. #task_checkStoreRoom().run()
  1452. task_start_game(1)
  1453. #check_safe_collect().run()
  1454. #task_fight_campion().run()
  1455. #task_activity_lianmeng().run()
  1456. #task_fight_yongbing(True).run()
  1457. #task_collect([4,3,2,1]).run()
  1458. #task_train("upgrade").run()
  1459. #task_information(True).run()
  1460. #check_buildOrResearch().run()
  1461. #task_checkDonata().run()
  1462. #task_checkUnionTreasure().run()
  1463. #task_checkAdventure2().run()
  1464. #task_collect(1).run()
  1465. #task_collect(2).run()
  1466. #task_collect(3).run()
  1467. #task_collect(4).run()
  1468. #task_returnAllLine().run()
  1469. #task_paticipateInTeam().run()
  1470. #task_fight_jina(True).run()
  1471. #task_get_redPackage().run()
  1472. #task_read_mails().run()
  1473. #task_checkBenifitStatus().run()
  1474. #task_checkDiamond().run()
  1475. #task_zhuguang().run()