Exemplo n.º 1
0
 def __init__(self, hwnd=0):
     '''
     初始化
     '''
     ExploreFight.__init__(self, hwnd=hwnd)
     self.log = MyLog.plogger
     self.start_time = time.time()
Exemplo n.º 2
0
 def __init__(self, hwnd=0, delay=False):
     '''
     初始化
         :param hwnd=0: 指定窗口句柄:0-否;其他-窗口句柄
         :param mode=0: 狗粮模式:0-正常模式,1-组队后排狗粮
         :param delay=False: 完成一轮探索后,是否等待1s再邀请下一轮
     '''
     ExploreFight.__init__(self, hwnd=hwnd, mode=1)
     self.delay = delay
     self.log = MyLog.dlogger
Exemplo n.º 3
0
    def start_onmyoji(self):
        # 读取配置
        self.get_conf()

        section = self.ui.tabWidget.currentIndex()
        if section == 0:
            # 御魂
            if mode == 0:
                # 单刷
                fight = SingleFight()
    
            if mode == 2:
                # 司机
                fight = DriverFighter()
    
            if mode == 3:
                # 乘客
                fight = FighterPassenger()
        
        elif section == 1:
            # 探索
            fight = ExploreFight()

        self.task = threading.Thread(target = fight.start)
        self.task.start()
Exemplo n.º 4
0
 def start(self):
     if self.run and self.tansuo > 0:
         self.switch_to_scene(4)
         tansuo = ExploreFight(max_tasks=self.tansuo, activate=False)
         tansuo.start()
     if self.run and self.yuhun > 0:
         self.switch_to_scene(7)
         yuhun = SingleFight(max_tasks=self.yuhun, activate=False)
         yuhun.start()
     if self.run and self.juexing > 0:
         self.switch_to_scene(6)
         juexing = SingleFight(max_tasks=self.juexing, activate=False)
         juexing.start()
     if self.run and self.tupo > 0:
         self.switch_to_scene(5)
         tupo = Breakthrough(max_tasks=self.tupo, activate=False)
         tupo.start()
Exemplo n.º 5
0
    def start_onmyoji(self):
        section = self.ui.tabWidget.currentIndex()

        # 读取主要副本
        self.get_conf(section)

        if section == 0:
            # 御魂
            if self.ui.mitama_single.isChecked():
                # 单刷
                self.fight = SingleFight()

            elif self.ui.mitama_driver.isChecked():
                # 司机
                self.fight = DriverFighter()

            if self.ui.mitama_passenger.isChecked():
                # 乘客
                self.fight = FighterPassenger()

            if self.ui.mitama_dual.isChecked():
                # 双开
                self.fight = DualFighter()

        elif section == 1:
            # 御灵
            self.fight = GoryouFight()

        elif section == 2:
            # 探索
            self.fight = ExploreFight()

        task = threading.Thread(target=self.fight.start)
        task.start()
Exemplo n.º 6
0
    def start_onmyoji(self):
        section = self.ui.tabWidget.currentIndex()
        # 读取配置
        self.get_conf(section)
        if section == 0:
            # 御魂
            if self.ui.mitama_single.isChecked():
                # 单刷
                self.fight = SingleFight()

            elif self.ui.mitama_driver.isChecked():
                # 司机
                self.fight = DriverFighter(self.ui.autoMark.isChecked())

            elif self.ui.mitama_passenger.isChecked():
                # 乘客
                self.fight = FighterPassenger()

            elif self.ui.mitama_dual.isChecked():
                # 双开
                self.fight = DualFighter(self.ui.autoMark.isChecked())

            elif self.ui.mitama_three.isChecked():
                self.fight = ThreePerson(self.ui.autoMark.isChecked())

        elif section == 1:
            self.fight = ExploreFight()

        task = threading.Thread(target=self.fight.start)
        task.start()
Exemplo n.º 7
0
def init():
    conf = configparser.ConfigParser()
    # 读取配置文件
    conf.read('conf.ini', encoding="utf-8")

    # 设置缩放
    # Query DPI Awareness (Windows 10 and 8)
    awareness = ctypes.c_int()
    errorCode = ctypes.windll.shcore.GetProcessDpiAwareness(
        0, ctypes.byref(awareness))

    # Set DPI Awareness  (Windows 10 and 8)
    client = conf.getint('DEFAULT', 'client')
    if client == 0:
        errorCode = ctypes.windll.shcore.SetProcessDpiAwareness(0)
    else:
        errorCode = ctypes.windll.shcore.SetProcessDpiAwareness(1)

    # 读取主要副本
    section = conf.getint('DEFAULT', 'run_section')

    if section == 0:
        # 御魂
        mode = conf.getint('DEFAULT', 'run_mode')
        if mode == 0:
            # 单刷
            fight = SingleFight()

        elif mode == 1:
            # 司机
            fight = DriverFighter()

        elif mode == 2:
            # 乘客
            fight = FighterPassenger()

        elif mode == 3:
            # 双开
            fight = DualFighter()

    elif section == 1:
        # 御灵
        fight = GoryouFight()

    elif section == 2:
        # 探索
        fight = ExploreFight()

    fight.start()
Exemplo n.º 8
0
    def start_onmyoji(self):
        section = self.ui.tabWidget.currentIndex()

        # 读取配置
        self.get_conf(section)

        if section == 0:
            # 御魂
            if self.ui.mitama_single.isChecked():
                # 单刷
                self.fight = SingleFight()

            elif self.ui.mitama_driver.isChecked():
                # 司机
                self.fight = DriverFighter()

            elif self.ui.mitama_passenger.isChecked():
                # 乘客
                self.fight = FighterPassenger()

            elif self.ui.mitama_dual.isChecked():
                # 双开
                self.fight = DualFighter()

        elif section == 1:
            # 探索
            self.fight = ExploreFight()

        elif section == 2:
            # 百鬼夜行
            self.fight = Ghost()

        elif section == 3:
            # 结界突破
            if self.ui.individual.isChecked():
                # 个人突破
                self.fight = Breakthrough()

            elif self.ui.shack.isChecked():
                # 个人突破
                self.fight = ShackBreakthrough()

        elif section == 4:
            self.fight = Task()

        task = threading.Thread(target=self.fight.start)
        task.start()
Exemplo n.º 9
0
def tansuo():
    '''探索战斗'''
    print(mode)
    if mode == 0:
        # 单刷
        fight = ExploreFight()
        fight.start()
    if mode == 3:
        # 乘客
        try:
            fight = PassengerExplore()
            fight.start()
        except Exception as e:
            print(e)
            os.system('pause')
Exemplo n.º 10
0
def init():
    conf = configparser.ConfigParser()
    # 读取配置文件
    conf.read('conf.ini', encoding="utf-8")

    # 读取主要副本
    section = conf.getint('DEFAULT', 'run_section')

    if section == 0:
        # 御魂
        mode = conf.getint('DEFAULT', 'run_mode')
        if mode == 0:
            # 单刷
            fight = SingleFight()

        elif mode == 1:
            # 司机
            fight = DriverFighter()

        elif mode == 2:
            # 乘客
            fight = FighterPassenger()

        elif mode == 3:
            # 双开
            fight = DualFighter()

    elif section == 1:
        # 御灵
        fight = GoryouFight()

    elif section == 2:
        # 探索
        fight = ExploreFight()

    fight.start()
Exemplo n.º 11
0
class MyMainWindow(QMainWindow):
    def __init__(self, parent=None):
        super(MyMainWindow, self).__init__(parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.ui.textEdit.ensureCursorVisible()

        h = GuiLogger()
        h.edit = self.ui.textEdit
        logger = logging.getLogger()
        logger.setLevel(logging.INFO)
        logger.addHandler(h)

    def set_conf(self, conf, section):
        '''
        设置参数至配置文件
        '''
        # 一般参数
        conf.set('watchdog', 'watchdog_enable',
                 str(self.ui.checkBox.isChecked()))
        conf.set('watchdog', 'max_win_time', str(self.ui.lineEdit.text()))
        conf.set('watchdog', 'max_op_time', str(self.ui.lineEdit_2.text()))

        conf.set('others', 'debug_enable', str(self.ui.checkBox_4.isChecked()))

        # 御魂参数
        if section == 0:
            pass

        # 探索参数
        if section == 1:
            # 探索
            conf.set('explore', 'fight_boss_enable',
                     str(self.ui.checkBox_2.isChecked()))
            conf.set('explore', 'slide_shikigami',
                     str(self.ui.checkBox_3.isChecked()))
            conf.set('explore', 'slide_shikigami_progress',
                     str(self.ui.horizontalSlider.value()))
            conf.set('explore', 'zhunbei_delay',
                     str(self.ui.lineEdit_3.text()))

    def get_conf(self, section):
        conf = configparser.ConfigParser()
        # 读取配置文件
        conf.read('conf.ini', encoding="utf-8")

        # 修改配置
        try:
            self.set_conf(conf, section)
        except:
            conf.add_section('watchdog')
            conf.add_section('explore')
            conf.add_section('others')
            self.set_conf(conf, section)

        # 保存配置文件
        with open('conf.ini', 'w') as configfile:
            conf.write(configfile)

    def start_onmyoji(self):
        section = self.ui.tabWidget.currentIndex()

        # 读取主要副本
        self.get_conf(section)

        if section == 0:
            # 御魂
            if self.ui.mitama_single.isChecked():
                # 单刷
                self.fight = SingleFight()

            elif self.ui.mitama_driver.isChecked():
                # 司机
                self.fight = DriverFighter()

            if self.ui.mitama_passenger.isChecked():
                # 乘客
                self.fight = FighterPassenger()

            if self.ui.mitama_dual.isChecked():
                # 双开
                self.fight = DualFighter()

        elif section == 1:
            # 御灵
            self.fight = GoryouFight()

        elif section == 2:
            # 探索
            self.fight = ExploreFight()

        task = threading.Thread(target=self.fight.start)
        task.start()

    def stop_onmyoji(self):
        try:
            self.fight.deactivate()
        except:
            pass
Exemplo n.º 12
0
def tansuo():
    '''探索战斗'''
    fight = ExploreFight()
    fight.start()
Exemplo n.º 13
0
 def __init__(self, hwnd=0):
     '''
     初始化
     '''
     ExploreFight.__init__(self, hwnd=hwnd)
     self.name = 'Passenger: '
Exemplo n.º 14
0
 def __init__(self, hwnd=0):
     '''
     初始化
     '''
     ExploreFight.__init__(self, hwnd=hwnd)
     self.log = MyLog.plogger
Exemplo n.º 15
0
 def __init__(self, hwnd=0):
     '''
     初始化
     '''
     ExploreFight.__init__(self, hwnd=hwnd, mode=1)
     self.name = 'Leader: '