fixed loop for double dig
added additional sort for equip
This commit is contained in:
@@ -38,8 +38,11 @@ def run():
|
||||
while runcounter != 0:
|
||||
if double_dig and runcounter == 1:
|
||||
dig_point(290, 100, 200)
|
||||
level = 1
|
||||
plot_size = 45
|
||||
cv.waitKey(2000)
|
||||
runcounter = runcounter - 1
|
||||
|
||||
while True:
|
||||
if keyboard.is_pressed('p') == True:
|
||||
pause = True
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import random
|
||||
from operator import itemgetter
|
||||
from time import time
|
||||
from window_capture import WindowCapture
|
||||
from vision import Vision
|
||||
@@ -20,7 +21,7 @@ HSV_DEFAULT = HsvFilter(0, 0, 0, 179, 255, 255, 0, 0, 0, 0)
|
||||
|
||||
|
||||
def run():
|
||||
EMITTER_TO_USE = EMITTER_RING
|
||||
EMITTER_TO_USE = EMITTER_WAND
|
||||
SPAWN_COUNT = 15
|
||||
# initialize the user-class
|
||||
config = UserConfigs()
|
||||
@@ -45,6 +46,11 @@ 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)
|
||||
@@ -119,6 +125,12 @@ def run():
|
||||
points = vision_stun.get_click_points(spawn_0)
|
||||
for point in points:
|
||||
click_point(config, points[0][0], points[0][1])
|
||||
|
||||
fixed_merge_pos_1 = [point[0] + 70, point[1]]
|
||||
fixed_merge_pos_2 = [point[0] + 140, point[1]]
|
||||
fixed_merge_pos_3 = [point[0] + 70, point[1] + 70]
|
||||
fixed_merge_pos_4 = [point[0] + 140, point[1] + 70]
|
||||
|
||||
if keyboard.is_pressed('p') == True or pause == True:
|
||||
pause = True
|
||||
break
|
||||
@@ -144,7 +156,11 @@ def run():
|
||||
pause = True
|
||||
break
|
||||
|
||||
#sort rectangles by top
|
||||
rectangles = sorted(rectangles, key=itemgetter(1))
|
||||
|
||||
points = vision_stun.get_click_points(rectangles)
|
||||
|
||||
move_breaker = check_and_move_tile(capture_window, vision_stun, config,
|
||||
[70, 70, rectangles[0][0] + 70, rectangles[0][1]], needles[rer],
|
||||
hsvs[rer], tresholds[rer], masks[rer],
|
||||
|
||||
Reference in New Issue
Block a user