added chest4 key4 support

This commit is contained in:
2022-05-22 14:48:44 +02:00
parent df3ec676be
commit f015b4c3c8
5 changed files with 18 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -96,6 +96,11 @@ def run():
include_wands(needles, hsvs, tresholds, masks)
include_bags(needles, hsvs, tresholds, masks)
c_needle = cv.imread("equip/chests/chest_4_32.jpg", cv.IMREAD_UNCHANGED)
c_mask = cv.imread("equip/chests/chest_4_32-mask.png", cv.IMREAD_COLOR)
k_needle = cv.imread("equip/keys/key_4_32.jpg", cv.IMREAD_UNCHANGED)
k_mask = cv.imread("equip/keys/key_4_32-mask.png", cv.IMREAD_COLOR)
while True:
if keyboard.is_pressed('p') == True:
@@ -146,6 +151,19 @@ def run():
continue
cv.waitKey(500)
if emitter == EMITTER_MAIN:
while True:
screenshot = capture_window.get_screenshot()
c_rectangles = vision_stun.find_by_mask_and_validate(screenshot, c_needle, c_mask, 1)
k_rectangles = vision_stun.find_by_mask_and_validate(screenshot, k_needle, k_mask, 1)
if (len(c_rectangles) == 1) and (len(k_rectangles) == 1):
c_point = vision_stun.get_click_points(c_rectangles)[0]
k_point = vision_stun.get_click_points(k_rectangles)[0]
move_tile(config, k_point, c_point)
else:
break
for rer in range(0, len(needles), 1):
loop_time = time()
while True: