Нужно изменить скрипт пайтон и подогнать под меня.
Привет, у меня есть скрипт пайтон который нужно подогнать под меня. Он заключаеться в том, что автоматически рыбачит в игре и при улове проходит маленькую мини игру.
import numpy as np
import cv2
from mss import MSS as mss
from PIL import Image
import time
import pyautogui as pg
import imutils
import mss
import numpy
import pyautogui
template = cv2.imread("1.png", cv2.IMREAD_GRAYSCALE)
w, h = template.shape[::-1]
color_yellow = (0,255,255)
mon = {'top': 80, 'left': 350, 'width': 100, 'height': 100}
def process_image(original_image):
processed_image = cv2.cvtColor(original_image, cv2.COLOR_BGR2GRAY)
processed_image = cv2.Canny(processed_image, threshold1=200, threshold2=300)
return processed_image
def ss():
op = 1
with mss.mss() as sct:
monitor = {"top": 40, "left": 0, "width": 800, "height": 640}
while "Screen capturing":
last_time = time.time()
img = numpy.array(sct.grab(monitor))
gray_frame = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
res = cv2.matchTemplate(gray_frame, template, cv2.TM_CCOEFF_NORMED)
loc = np.where(res >= 0.7)
op += 1
print (op)
for pt in zip(*loc[::-1]):
cv2.rectangle(img, pt, (pt[0] + w, pt[1] + h), (0, 255, 0), 3)
for p in img:
pts = (pt[0],pt[1])
x = (pt[0])
y = (pt[1])
print (x)
if 100 < x < 490:
pyautogui.mouseDown(button='left')
time.sleep(2)
pyautogui.mouseUp(button='left')
x = 0
break
else:
continue
break
else:
continue
break
key = cv2.waitKey(1)
if cv2.waitKey(25) & 0xFF == ord("q"):
cv2.destroyAllWindows()
if op > 35:
return
def screen_record():
sct = mss.mss()
last_time = time.time()
while(True):
img = sct.grab(mon)
print('loop took {} seconds'.format(time.time() - last_time))
last_time = time.time()
img = np.array(img)
processed_image = process_image(img)
mean = np.mean(processed_image)
print('mean = ', mean)
if mean <= float(0.11):
print('SSSSSSSS ')
pyautogui.click(button='left')
break
return
else:
time.sleep(0.01)
continue
return
if cv2.waitKey(25) & 0xFF == ord('q'):
cv2.destroyAllWindows()
break
while "Черный":
time.sleep(1)
pyautogui.moveTo(431,175,duration=1)
pyautogui.mouseDown(button='left')
pyautogui.moveTo(450.200,duration=1)
pyautogui.mouseUp(button='left')
time.sleep(2)
screen_record()
time.sleep(0.01)
ss()
Вот скрипт и видео как скрипт должен работать.
-
7 Здравствуйте я хочу выполнить ваш заказ в течении 2 дней, но я смогу его скорее всего за 1 день.
-
110 5 0 1 Доброе время суток.
В чем заключается изменение под вас?
Можете подробно описать?
Жду в ЛС)))
Current freelance projects in the category Python
Creation of a TikTok farm with income generation
601 USD
Looking for a person who can write software for a TikTok farm, so we can generate traffic and earn income. We are seeking a ready-made solution with a full cycle. Python, Bot Development ∙ 1 day 19 hours back ∙ 15 proposals |
AI Commenting Platform for TikTok and Instagram.Project Goal Develop a system that allows managing a large number of TikTok and Instagram accounts and automatically posting relevant comments under selected videos using AI. Main Functionality1. Account Management It is necessary to implement the ability to connect accounts:… AI & Machine Learning, Python ∙ 3 days 3 hours back ∙ 22 proposals |
Build a customer classification model1. There is client data in Mongo/SQL (approximately 20,000 entries with raw data). 2. It is necessary to build features and a classification model of clients into behavioral groups based on this data. 3. The project should be completed in Python. AI & Machine Learning, Python ∙ 4 days 21 hours back ∙ 43 proposals |
IT Automation of VAT Reporting
223 USD
It is necessary to develop a system for automating the transfer of sales data from the CRM to the accounting system Wafeq. The system should import bank and payment reports, automatically reconcile payments with invoices, generate invoices for VAT reporting, and minimize manual… AI & Machine Learning, Python ∙ 5 days 2 hours back ∙ 51 proposals |
Account reconciliation tool with the bank, cards, and accountantTechnical Assignment: Tool for Reconciling Accounts with Bank, Cards, and AccountantGeneral Goal A local tool (script/small application in Python) is needed, which is manually run once every 1-2 months on my computer and performs reconciliation between: Invoices I issued to… Python, Desktop Apps ∙ 5 days 15 hours back ∙ 43 proposals |