示例#1
0
    def start(self):
        log.init_time()
        log.info('# start warp to anomaly')

        self._is_anomaly_closed = False

        anomaly_pos, anomaly_info = action.find_anomaly_pos(
            anomaly_init_pos, anomaly_name_list, self._except_anomaly_ids)
        if anomaly_pos is not None:
            log.info('found anomaly - start warping')
            anomaly_pos[0] = anomaly_warp_x
            action.click_pos(anomaly_pos)

            if 'drone' in anomaly_info['name'].lower():
                action.click_pos(anomaly_info_close_pos)

            warp_result, target_data = action.check_warp_end(enemy_bar_pos)

            is_someone_in_grid, grid_data = action.get_grid_info(target_data)
            if is_someone_in_grid:
                log.info('have someone in anomaly with name: ' +
                         grid_data['name'])
                self._is_anomaly_closed = True
                self._except_anomaly_ids.append(anomaly_info['id'])

            if not warp_result:
                self._is_anomaly_closed = True
        else:
            self._is_anomaly_end = True

        log.info('# elapsed time: ' + str(log.elapsed_time()) + ' sec')
        log.info('# end warp to anomaly')
示例#2
0
    def start(self):
        log.info('# start travel process!')
        helper.clear_clipboard()
        clipboard_data = action.get_jump_title_data()

        if self._check_travel_data(clipboard_data):
            log.info('has destination path')
            prev_system = clipboard_data
            # check warp bar

            while True:
                action.init_gate_warp()
                action.click_pos(warp_pos)

                warp_delay = helper.get_random_delay(8, 15)
                log.info('warping with delay: ' + str(warp_delay) + ' sec')
                sleep(warp_delay)

                helper.clear_clipboard()
                clipboard_data = action.get_jump_title_data()
                if clipboard_data is not None and clipboard_data.lower(
                ) == "no destination":
                    self._is_path_end = True
                    break

                if clipboard_data is not None and prev_system != clipboard_data and self._is_iter_jump:
                    sleep(2)
                    break

        log.info('# end travel process!')


# TFL-699	Cosmic Anomaly	Combat Site	Guristas Hidden Hideaway	100.0%	10.96 AU
# Suroken IX - Moon 2 - Core Complexion Inc. Factory<br>Distance: 11.9 AU
示例#3
0
    def start(self):
        log.init_time()
        log.info('# start looting wreck')
        item_pos = action.find_item_in_bar(wreck_bar_pos, self._rare_ship_name)

        if item_pos is not None:
            # move to wreck
            log.info('found item position')
            action.click_pos(item_pos)
            target_info = action.parse_target_data(action.get_target_data())
            target_distance = action.parse_distance(target_info["distance"])

            if (target_distance["metric"] == "km" and target_distance["number"] * 1000 > loot_distance) or \
                    (target_distance["metric"] == "m" and target_distance["number"] > loot_distance):
                log.info('flying to wreck')
                if target_distance["metric"] == "km":
                    target_distance["number"] *= 1000

                action.fly_to_target(target_distance["number"], loot_distance)

            log.info('looting items')
            action.click_pos(loot_pos, 2)

            # loot all
            action.click_pos(loot_all_pos, 2)
            action.click_pos(close_inventory_pos)

        log.info('# elapsed time: ' + str(log.elapsed_time()) + ' sec')
        log.info('# end looting wreck')
示例#4
0
    def start(self):
        action.click_pos(enemy_bar_pos)
        log.init_time()
        log.info('# start killing enemies')

        # activate sub module
        action.click_sub_modules()

        while True:
            action.click_pos(enemy_pos)

            target_info = action.parse_target_data(action.get_target_data())
            if 'distance' in target_info:
                target_distance = action.parse_distance(
                    target_info["distance"])

                log.info('\ntarget name: ' + target_info["name"])

                if target_info[
                        "name"] == "empty" or 'metric' not in target_distance:
                    break

                is_target_exist = True
                if target_distance["metric"] == "km" and target_distance[
                        "number"] * 1000 > action.optimal_distance:
                    is_target_exist = action.fly_to_target(
                        target_distance["number"] * 1000)

                if is_target_exist:
                    log.info('lock target')
                    action.click_pos(lock_target_pos)

                    action.click_pos(attack_module_pos)

                    log.info('killing target')
                    action.destroy_target()

                    for rare_name in rare_ship_name:
                        if rare_name in target_info["name"]:
                            self._is_killed_rare_ship = True
            else:
                break

        # de-activate sub modules
        action.click_sub_modules()
        action.click_pos(anomaly_info_close_pos)

        log.info('# elapsed time: ' + str(log.elapsed_time()) + ' sec')
        log.info('# end killing enemies')
示例#5
0
    def third_stage(self):
        kill_enemy = KillEnemy()
        kill_enemy.start()

        item_pos = action.find_item_in_bar(
            gate_bar_pos, ['Acceleration Gate to Central Warehouses'])

        if item_pos is not None:
            log.info('found item position')
            action.click_pos(item_pos)

            target_info = action.parse_target_data(action.get_target_data())
            target_distance = action.parse_distance(target_info["distance"])

            if (target_distance["metric"] == "km" and target_distance["number"] * 1000 > loot_distance) or \
                    (target_distance["metric"] == "m" and target_distance["number"] > loot_distance):
                log.info('flying to wreck')
                if target_distance["metric"] == "km":
                    target_distance["number"] *= 1000

                action.fly_to_target(target_distance["number"], loot_distance)

            action.click_pos(warp_dock_loot_pos)

            action.check_warp_end(enemy_bar_pos)
            action.click_pos(anomaly_info_close_pos)
        else:
            return False

        return True
示例#6
0
    def first_stage(self):
        item_pos = action.find_item_in_bar(gate_bar_pos,
                                           ['Ancient Acceleration Gate'])

        if item_pos is not None:
            # move to wreck
            log.info('found item position')
            action.click_pos(item_pos)

            action.click_pos(warp_dock_loot_pos)

            action.check_warp_end(enemy_bar_pos)

            action.click_pos(anomaly_info_close_pos)
        else:
            return False

        return True
示例#7
0
 def start(self):
     item_pos = action.find_item_in_bar(struct_bar_pos, ['Warehouse'])
     if item_pos is not None:
         action.click_pos(item_pos)
示例#8
0
    def fifth_stage(self):
        # activate sub module
        action.click_sub_modules()

        item_pos = action.find_item_in_bar(struct_bar_pos,
                                           ['Serpentis Supply Stronghold'])
        if item_pos is not None:
            target_info = action.parse_target_data(action.get_target_data())
            target_distance = action.parse_distance(target_info["distance"])

            log.info('\ntarget name: ' + target_info["name"])

            if target_info["name"] == "empty":
                return False

            if target_distance["metric"] == "km" and target_distance[
                    "number"] * 1000 > action.optimal_distance:
                action.fly_to_target(target_distance["number"] * 1000)

            log.info('lock target')
            action.click_pos(lock_target_pos)

            action.click_pos(attack_module_pos)

            log.info('killing target')
            action.destroy_target(with_periscope_drones=True,
                                  periscope_timeout=24)
            sleep(10)

            action.click_pos(anomaly_info_close_pos)
            container_item_pos = action.find_item_in_bar(
                struct_bar_pos, ['Cargo Container'])

            while True:
                if container_item_pos is not None:
                    if (target_distance["metric"] == "km" and target_distance["number"] * 1000 > loot_distance) or \
                            (target_distance["metric"] == "m" and target_distance["number"] > loot_distance):
                        log.info('flying to wreck')
                        if target_distance["metric"] == "km":
                            target_distance["number"] *= 1000

                        action.fly_to_target(target_distance["number"],
                                             loot_distance)

                    log.info('looting items')
                    action.click_pos(loot_pos, 2)

                    # loot all
                    action.click_pos(loot_all_pos, 2)
                    action.click_pos(close_inventory_pos)

                    break
                else:
                    break

                container_item_pos = action.find_item_in_bar(
                    struct_bar_pos, ['Cargo Container'],
                    start_item_pos=container_item_pos + 18)
        else:
            return False

        # de-activate sub module
        action.click_sub_modules()
        return True