added spawn option to combine overlay
fixed perceiving red bug
This commit is contained in:
@@ -37,6 +37,8 @@ def run():
|
|||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
SPAWN_COUNT = int(overlay.spawn_use.get())
|
||||||
|
|
||||||
capture_window = WindowCapture(None, "magic", config)
|
capture_window = WindowCapture(None, "magic", config)
|
||||||
|
|
||||||
# initialize the StunVision class
|
# initialize the StunVision class
|
||||||
@@ -86,11 +88,11 @@ def run():
|
|||||||
#cv.waitKey(150)
|
#cv.waitKey(150)
|
||||||
#continue
|
#continue
|
||||||
|
|
||||||
spawn_1 = vision_stun.find(screenshot, cv.imread("magic/spawn_1.jpg", cv.IMREAD_UNCHANGED), 0.25, 1)
|
spawn_1 = vision_stun.find(screenshot, cv.imread("magic/spawn_1.jpg", cv.IMREAD_UNCHANGED), 0.4, 1)
|
||||||
if len(spawn_1) == 1:
|
if len(spawn_1) == 1:
|
||||||
spawn_button_active = True
|
spawn_button_active = True
|
||||||
points = vision_stun.get_click_points(spawn_1)
|
points = vision_stun.get_click_points(spawn_1)
|
||||||
for i in range(0, 100, 1):
|
for i in range(0, SPAWN_COUNT, 1):
|
||||||
pydirectinput.moveTo(points[0][0], points[0][1])
|
pydirectinput.moveTo(points[0][0], points[0][1])
|
||||||
pydirectinput.mouseDown()
|
pydirectinput.mouseDown()
|
||||||
w = random.randint(1, 50)
|
w = random.randint(1, 50)
|
||||||
|
|||||||
@@ -13,11 +13,15 @@ class CombineOverlay(threading.Thread):
|
|||||||
|
|
||||||
self.root = tk.Tk
|
self.root = tk.Tk
|
||||||
|
|
||||||
|
self.spawn_use = tk.StringVar
|
||||||
|
self.SpawnLabel = tk.Label
|
||||||
|
self.SpawnEntry = tk.Entry
|
||||||
|
|
||||||
self.ButtonFrame = tk.Frame
|
self.ButtonFrame = tk.Frame
|
||||||
|
|
||||||
self.StartButton = tk.Button
|
self.StartButton = tk.Button
|
||||||
self.StopButton = tk.Button
|
self.StopButton = tk.Button
|
||||||
self.TkPosition = '133x52+60+600'
|
self.TkPosition = '133x75+60+600'
|
||||||
|
|
||||||
self.StatusLabel = tk.Label
|
self.StatusLabel = tk.Label
|
||||||
|
|
||||||
@@ -25,12 +29,19 @@ class CombineOverlay(threading.Thread):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.root = tk.Tk()
|
self.root = tk.Tk()
|
||||||
|
self.spawn_use = tk.StringVar(self.root, value='100')
|
||||||
|
self.SpawnLabel = tk.Label(self.root, text="Spawn:", font=("Helvetica", 10, "bold"),
|
||||||
|
background="grey")
|
||||||
|
self.SpawnLabel.grid(row=0, column=0)
|
||||||
|
self.SpawnEntry = tk.Entry(self.root, textvariable=self.spawn_use, font=("Helvetica", 10, "bold"), width='12')
|
||||||
|
|
||||||
|
self.SpawnEntry.grid(row=0, column=1, columnspan=2)
|
||||||
self.ButtonFrame = tk.Frame(self.root)
|
self.ButtonFrame = tk.Frame(self.root)
|
||||||
self.StartButton = tk.Button(self.ButtonFrame, text="Start", command=self.start_button_callback, width='8')
|
self.StartButton = tk.Button(self.ButtonFrame, text="Start", command=self.start_button_callback, width='8')
|
||||||
self.StartButton.grid(row=0, column=0)
|
self.StartButton.grid(row=1, column=0)
|
||||||
self.StopButton = tk.Button(self.ButtonFrame, text="Stop", command=self.stop_button_callback, width='8',
|
self.StopButton = tk.Button(self.ButtonFrame, text="Stop", command=self.stop_button_callback, width='8',
|
||||||
state=tk.DISABLED)
|
state=tk.DISABLED)
|
||||||
self.StopButton.grid(row=0, column=1)
|
self.StopButton.grid(row=1, column=1)
|
||||||
|
|
||||||
self.ButtonFrame.grid(row=3, column=0, columnspan=2)
|
self.ButtonFrame.grid(row=3, column=0, columnspan=2)
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.1 KiB |
Reference in New Issue
Block a user