impl staff
This commit is contained in:
@@ -44,9 +44,9 @@ def run():
|
|||||||
if level >= 28:
|
if level >= 28:
|
||||||
break
|
break
|
||||||
if level == 23:
|
if level == 23:
|
||||||
DIG_TIME = 850
|
DIG_TIME = 800
|
||||||
if level == 26:
|
if level == 26:
|
||||||
DIG_TIME = 1850
|
DIG_TIME = 1800
|
||||||
if level <= 10:
|
if level <= 10:
|
||||||
plot_size = plot_size - 1
|
plot_size = plot_size - 1
|
||||||
elif level % 2 == 0:
|
elif level % 2 == 0:
|
||||||
|
|||||||
@@ -12,10 +12,11 @@ EMITTER_MAIN = "main"
|
|||||||
EMITTER_MUSH = "mushroom"
|
EMITTER_MUSH = "mushroom"
|
||||||
EMITTER_AMU = "amulett"
|
EMITTER_AMU = "amulett"
|
||||||
EMITTER_SWORD = "sword"
|
EMITTER_SWORD = "sword"
|
||||||
|
EMITTER_STAFF = "staff"
|
||||||
|
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
EMITTER_TO_USE = EMITTER_MAIN
|
EMITTER_TO_USE = EMITTER_STAFF
|
||||||
|
|
||||||
# initialize the user-class
|
# initialize the user-class
|
||||||
config = UserConfigs()
|
config = UserConfigs()
|
||||||
@@ -59,6 +60,10 @@ def run():
|
|||||||
include_books(needles, hsv)
|
include_books(needles, hsv)
|
||||||
include_swords(needles, hsv)
|
include_swords(needles, hsv)
|
||||||
include_bags(needles, hsv)
|
include_bags(needles, hsv)
|
||||||
|
elif EMITTER_TO_USE == EMITTER_STAFF:
|
||||||
|
include_books(needles, hsv)
|
||||||
|
include_staffs(needles, hsv)
|
||||||
|
include_bags(needles, hsv)
|
||||||
|
|
||||||
pause = True
|
pause = True
|
||||||
while True:
|
while True:
|
||||||
@@ -284,6 +289,17 @@ def include_swords(needles, hsv):
|
|||||||
needles.append(cv.imread("equip/sword_5_32.jpg", cv.IMREAD_UNCHANGED))
|
needles.append(cv.imread("equip/sword_5_32.jpg", cv.IMREAD_UNCHANGED))
|
||||||
hsv.append(HsvFilter(0, 0, 0, 179, 255, 255, 0, 0, 0, 0))
|
hsv.append(HsvFilter(0, 0, 0, 179, 255, 255, 0, 0, 0, 0))
|
||||||
|
|
||||||
|
def include_staffs(needles, hsv):
|
||||||
|
needles.append(cv.imread("equip/staff_1_32.jpg", cv.IMREAD_UNCHANGED))
|
||||||
|
hsv.append(HsvFilter(0, 0, 0, 179, 255, 255, 0, 0, 0, 0))
|
||||||
|
needles.append(cv.imread("equip/staff_2_32.jpg", cv.IMREAD_UNCHANGED))
|
||||||
|
hsv.append(HsvFilter(0, 0, 0, 179, 255, 255, 0, 0, 0, 0))
|
||||||
|
needles.append(cv.imread("equip/staff_3_32.jpg", cv.IMREAD_UNCHANGED))
|
||||||
|
hsv.append(HsvFilter(0, 0, 0, 179, 255, 255, 0, 0, 0, 0))
|
||||||
|
needles.append(cv.imread("equip/staff_4_32.jpg", cv.IMREAD_UNCHANGED))
|
||||||
|
hsv.append(HsvFilter(0, 0, 0, 179, 255, 255, 0, 0, 0, 0))
|
||||||
|
#needles.append(cv.imread("equip/sword_5_32.jpg", cv.IMREAD_UNCHANGED))
|
||||||
|
#hsv.append(HsvFilter(0, 0, 0, 179, 255, 255, 0, 0, 0, 0))
|
||||||
|
|
||||||
def move_tile(conf, point_source, point_dest):
|
def move_tile(conf, point_source, point_dest):
|
||||||
offset_left = conf.returnEquipmentWindowPos()[2]
|
offset_left = conf.returnEquipmentWindowPos()[2]
|
||||||
@@ -318,7 +334,11 @@ def find_emitter(emitter_to_use, vis, screen, layer):
|
|||||||
return vis.find(screen, cv.imread("equip/sword_e1_32.jpg", cv.IMREAD_UNCHANGED), 0.8, 1)
|
return vis.find(screen, cv.imread("equip/sword_e1_32.jpg", cv.IMREAD_UNCHANGED), 0.8, 1)
|
||||||
else:
|
else:
|
||||||
return vis.find(screen, cv.imread("equip/sword_e2_32.jpg", cv.IMREAD_UNCHANGED), 0.7, 1)
|
return vis.find(screen, cv.imread("equip/sword_e2_32.jpg", cv.IMREAD_UNCHANGED), 0.7, 1)
|
||||||
|
elif emitter_to_use == EMITTER_STAFF:
|
||||||
|
if layer == 0:
|
||||||
|
return vis.find(screen, cv.imread("equip/staff_e1_32.jpg", cv.IMREAD_UNCHANGED), 0.8, 1)
|
||||||
|
else:
|
||||||
|
return vis.find(screen, cv.imread("equip/staff_e2_32.jpg", cv.IMREAD_UNCHANGED), 0.7, 1)
|
||||||
|
|
||||||
def check_and_move_tile(capture_win, visio, conf, rect, needl, hsv, point_source, point_dest):
|
def check_and_move_tile(capture_win, visio, conf, rect, needl, hsv, point_source, point_dest):
|
||||||
screenshot_pos = capture_win.get_screenshot_by_area(rect)
|
screenshot_pos = capture_win.get_screenshot_by_area(rect)
|
||||||
|
|||||||
2
utils.py
2
utils.py
@@ -156,7 +156,7 @@ def update_screenshot_with_short_pic_list(short_pic_lst, lst_bl_items):
|
|||||||
|
|
||||||
def dig_point(point1, point2, dig_time):
|
def dig_point(point1, point2, dig_time):
|
||||||
pydirectinput.moveTo(point1, point2)
|
pydirectinput.moveTo(point1, point2)
|
||||||
cv.waitKey(50)
|
cv.waitKey(100)
|
||||||
pydirectinput.mouseDown()
|
pydirectinput.mouseDown()
|
||||||
w = random.randint(1, 50)
|
w = random.randint(1, 50)
|
||||||
cv.waitKey(dig_time + w)
|
cv.waitKey(dig_time + w)
|
||||||
|
|||||||
Reference in New Issue
Block a user