brief wait after pick

This commit is contained in:
mgleed
2021-11-24 15:39:34 -05:00
parent bc8aea48a8
commit 5c461f096a
3 changed files with 4 additions and 3 deletions
-1
View File
@@ -34,7 +34,6 @@ class IChar:
mouse.move(pos[0], pos[1])
time.sleep(0.1)
mouse.click(button="left")
time.sleep(0.2)
def select_by_template(self, template_type: Union[str, List[str]], expect_loading_screen: bool = False) -> bool:
if template_type == "A5_STASH":
+2 -2
View File
@@ -22,9 +22,9 @@ class Sorceress(IChar):
def pick_up_item(self, pos: Tuple[float, float], item_name: str = ''):
if self._skill_hotkeys["telekinesis"] and any(x in item_name for x in ['potion', 'misc_gold']):
keyboard.send(self._skill_hotkeys["telekinesis"])
wait(0.1, 0.13)
wait(0.1, 0.2)
mouse.move(pos[0], pos[1])
wait(0.1, 0.13)
wait(0.1, 0.2)
mouse.click(button="right")
else:
super().pick_up_item((pos[0], pos[1]),item_name)
+2
View File
@@ -3,6 +3,7 @@ from ui_manager import UiManager
from item_finder import ItemFinder
import time
from utils.custom_mouse import mouse
from utils.misc import wait
import keyboard
import cv2
from config import Config
@@ -73,6 +74,7 @@ class PickIt:
found_items = True
Logger.info(f"Picking up: {closest_item.name}, score: {closest_item.score}")
char.pick_up_item((x_m, y_m),item_name=closest_item.name)
wait(0.3,0.5)
if self._ui_manager.is_overburdened():
Logger.warning("Inventory full, skipping pickit!")