added smaler mining area
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# Run tkinter code in another thread
|
||||
import threading
|
||||
import tkinter as tk
|
||||
import game_base_class
|
||||
from tkinter import ttk
|
||||
from mine_overlay import DiggingOverlay
|
||||
|
||||
@@ -67,7 +68,7 @@ class PrimaryOverlay(threading.Thread):
|
||||
self.start()
|
||||
|
||||
def run(self):
|
||||
self.MiningOverlay = DiggingOverlay()
|
||||
self.MiningOverlay = DiggingOverlay(game_base_class.MINING_LARGE)
|
||||
self.root = tk.Tk()
|
||||
|
||||
self.rb_frame = tk.Frame(self.root)
|
||||
|
||||
@@ -59,9 +59,12 @@ class UserConfigs:
|
||||
else:
|
||||
pass
|
||||
|
||||
def returnDiggingWindowPos2(self):
|
||||
def returnDiggingWindowPos2(self, large=True):
|
||||
if self.user == self.THALOUSER:
|
||||
if large:
|
||||
return [1440, 1150, 570, 22]
|
||||
else:
|
||||
return [1440, 210, 560, 700]
|
||||
elif self.user == self.ADWAUSER:
|
||||
return [740, 450, 1625, 985]
|
||||
elif self.user == self.EDDIEUSER:
|
||||
|
||||
@@ -29,6 +29,7 @@ TENESENT = 23
|
||||
CIBUTRANT = 24
|
||||
ARTISENT = 25
|
||||
|
||||
MINING_LARGE = True
|
||||
|
||||
class GameBase:
|
||||
|
||||
|
||||
6
mine.py
6
mine.py
@@ -1,4 +1,6 @@
|
||||
import cv2 as cv
|
||||
|
||||
import game_base_class
|
||||
from utils import dig_point, check_for_ok_button
|
||||
from game_base_class import GameBase
|
||||
from window_capture import WindowCapture
|
||||
@@ -63,8 +65,8 @@ class Mine(GameBase):
|
||||
elif self.level % 2 == 0:
|
||||
self.plot_size = self.plot_size - 1
|
||||
|
||||
p1 = int((self.config.returnDiggingWindowPos2()[0] / 2) + self.config.returnDiggingWindowPos2()[2])
|
||||
p2 = int((self.config.returnDiggingWindowPos2()[1] / 2) + self.config.returnDiggingWindowPos2()[3])
|
||||
p1 = int((self.config.returnDiggingWindowPos2(game_base_class.MINING_LARGE)[0] / 2) + self.config.returnDiggingWindowPos2(game_base_class.MINING_LARGE)[2])
|
||||
p2 = int((self.config.returnDiggingWindowPos2(game_base_class.MINING_LARGE)[1] / 2) + self.config.returnDiggingWindowPos2(game_base_class.MINING_LARGE)[3])
|
||||
|
||||
# start 705 , 564 -> click
|
||||
# move L D -> click
|
||||
|
||||
@@ -5,11 +5,14 @@ import tkinter as tk
|
||||
|
||||
class DiggingOverlay(threading.Thread):
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, large_display=True):
|
||||
threading.Thread.__init__(self)
|
||||
self.root = tk.Tk
|
||||
self.EnemyLabel = tk.Label
|
||||
if large_display:
|
||||
self.TkPosition = '1440x1150+570+22'
|
||||
else:
|
||||
self.TkPosition = '1440x210+560+700'
|
||||
self.setDaemon(True)
|
||||
self.start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user