l103.py 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. from module.logger import logger
  2. from tasks.SixRealms.moon_sea.skills import MoonSeaSkills
  3. class MoonSeaL103(MoonSeaSkills):
  4. def run_103(self):
  5. # 宝箱还是精英
  6. logger.hr('Island 103')
  7. self.wait_until_appear(self.I_ISLAND_TAG_FLAG, wait_time=2)
  8. is_box: bool = self.appear(self.I_L103_EXIT)
  9. if is_box:
  10. logger.info('Access to Box')
  11. while 1:
  12. self.screenshot()
  13. if self.appear(self.I_M_STORE):
  14. logger.info('Not punched the treasure box')
  15. return
  16. if self.appear(self.I_BOSS_FIRE):
  17. logger.info('Not punched the treasure box')
  18. return
  19. if self.appear_then_click(self.I_UI_UNCHECK, interval=0.5):
  20. continue
  21. if self.appear_then_click(self.I_UI_CONFIRM, interval=1):
  22. continue
  23. if self.appear_then_click(self.I_L103_EXIT, interval=4):
  24. continue
  25. self.battle_l103()
  26. logger.info('Island 103 Finished')
  27. def battle_l103(self):
  28. # 打精英
  29. logger.info('Start Island battle')
  30. while 1:
  31. self.screenshot()
  32. if self.appear(self.I_NPC_FIRE):
  33. break
  34. if self.click(self.C_NPC_FIRE_CENTER, interval=4):
  35. continue
  36. self.battle_lock_team()
  37. self.island_battle()
  38. logger.info('Island battle finished')
  39. self.select_skill(refresh=True)
  40. if __name__ == '__main__':
  41. from module.config.config import Config
  42. from module.device.device import Device
  43. c = Config('oas1')
  44. d = Device(c)
  45. t = MoonSeaL103(c, d)
  46. t.screenshot()
  47. t.run_103()