charisma.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # This Python file uses the following encoding: utf-8
  2. # @author runhey
  3. # github https://github.com/runhey
  4. import time
  5. from module.logger import logger
  6. from tasks.GameUi.page import page_main, page_guild
  7. from tasks.RichMan.mall.friendship_points import FriendshipPoints
  8. from tasks.RichMan.config import Charisma as CharismaConfig
  9. class Charisma(FriendshipPoints):
  10. def execute_charisma(self, con: CharismaConfig = None):
  11. if not con:
  12. logger.info('Charisma is not enable')
  13. con = self.config.rich_man.charisma
  14. if not con.enable:
  15. logger.info('Charisma is not enable')
  16. return
  17. self._enter_charisma()
  18. # 开始
  19. # 黑色碎片
  20. if con.black_daruma_scrap:
  21. self.buy_mall_more(buy_button=self.I_CH_BLACK, remain_number=True,
  22. money_ocr=self.O_MALL_RESOURCE_5,
  23. buy_number=2, buy_max=2, buy_money=320)
  24. # 蓝票
  25. if con.mystery_amulet:
  26. self.buy_mall_one(buy_button=self.I_CH_BLUE, buy_check=self.I_CH_CHECK_BLUE,
  27. money_ocr=self.O_MALL_RESOURCE_5, buy_money=400)
  28. if __name__ == '__main__':
  29. from module.config.config import Config
  30. from module.device.device import Device
  31. c = Config('oas1')
  32. d = Device(c)
  33. t = Charisma(c, d)