dongri_task.py 64 KB

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