added equip ok button check
This commit is contained in:
@@ -8,7 +8,7 @@ from hsvfilter import HsvFilter
|
||||
from config_file import UserConfigs
|
||||
import pydirectinput
|
||||
import keyboard
|
||||
from utils import check_for_ok_button
|
||||
from utils import dig_point
|
||||
|
||||
EMITTER_MAIN = "main"
|
||||
EMITTER_MUSH = "mushroom"
|
||||
@@ -47,11 +47,6 @@ def run():
|
||||
tresholds = []
|
||||
masks = []
|
||||
|
||||
fixed_merge_pos_1 = []
|
||||
fixed_merge_pos_2 = []
|
||||
fixed_merge_pos_3 = []
|
||||
fixed_merge_pos_4 = []
|
||||
|
||||
if EMITTER_TO_USE == EMITTER_MUSH:
|
||||
include_books(needles, hsvs, tresholds, masks)
|
||||
include_mushs(needles, hsvs, tresholds, masks)
|
||||
@@ -134,7 +129,12 @@ def run():
|
||||
|
||||
cv.waitKey(500)
|
||||
for rer in range(0, len(needles), 1):
|
||||
if check_for_ok_button():
|
||||
screenshot = capture_window.get_screenshot_by_area(config.returnOKWindowPos())
|
||||
rectangles = vision_stun.find(screenshot, cv.imread("dig/ok_button.jpg", cv.IMREAD_UNCHANGED), 0.5, 1)
|
||||
if len(rectangles) == 1:
|
||||
pointis = vision_stun.get_click_points(rectangles)
|
||||
for pointi in pointis:
|
||||
dig_point(pointi[0] + config.returnOKWindowPos()[2], pointi[1] + config.returnOKWindowPos()[3], 150)
|
||||
cv.waitKey(60000)
|
||||
continue
|
||||
while True:
|
||||
|
||||
Reference in New Issue
Block a user