dongri_task.py 66 KB

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