示例#1
0
 def use_item(self, item):
     if not item.available:
         logging.critical("Item cannot be used if it is unavailable.")
     click_press.mouse_position(self.item_cords.item_cat_loc)
     click_press.left_click()
     click_press.mouse_position(item.coordinates)
     click_press.left_click()
     item.cool_down = Settings.item_cooldown  # Fix Later as a cool down dictionary that checks levels
     item.available = False
示例#2
0
文件: Skills.py 项目: Tigenzero/HVB
def use_spirit(current_spirit, current_overcharge, im):
    if (
        current_overcharge >= 80
        and Skills.overcharge_cooldown <= 0
        and current_spirit >= 40
        and not is_spirit_active(im)
        and Settings.Player.spirit
    ):
        mouse_position(Cord.spirit_cat_loc)
        left_click()
        Skills.overcharge_cooldown = 10
        return True
    else:
        Skills.overcharge_cooldown -= 1
        return False
示例#3
0
 def get_gem(self, gem_color):
     """
     :param gem_color: result of status.get_pixel_sum_color(self.item_cords.ibox_gem)
     :return: logging message
     """
     message = "no gem found"
     if 710000 <= gem_color <= 719999:
         #logging.debug("health gem found")
         message = "health gem found"
         self.current_gem = 0
     elif 729000 <= gem_color <= 729999:
         #logging.debug("mana gem found")
         message = "mana gem found"
         self.current_gem = 1
     elif 723000 <= gem_color <= 723999:
         #logging.debug("spirit gem found")
         message = "spirit gem found"
         self.current_gem = 2
     elif 722000 <= gem_color <= 722999:
         self.current_gem = 3
         message = "Channeling gem found"
     click_press.mouse_position(self.item_cords.item_cat_loc)
     click_press.left_click()
     return message
示例#4
0
 def use_skill(self):
     click_press.mouse_position(self.click_coordinates)
     click_press.left_click()
示例#5
0
 def use_spirit(self):
     click_press.mouse_position(self.spirit_cords.spirit_cat_loc)
     click_press.left_click()
     self.overcharge_cooldown = 10
示例#6
0
文件: Skills.py 项目: Tigenzero/HVB
def use_skill(skill):
    # mouse_position(Cord.Cure)
    if skill >= 0:
        mouse_position(Cord.skills[skill])
        left_click()
示例#7
0
 def close_item_tab(self):
     click_press.mouse_position(self.item_cords.item_cat_loc, True)
     click_press.left_click()
示例#8
0
 def open_item_tab(self):
     click_press.mouse_position(self.item_cords.item_cat_loc, True)
     click_press.left_click()
     time.sleep(1.0)
示例#9
0
 def activate_gem(self):
     self.open_item_tab()
     click_press.mouse_position(self.item_cords.gem_loc)
     click_press.left_click()
     self.current_gem = None