Peršokti į turinį
  • ŽAIDIMAI
  • , ŽAIDIMAI
  • ŽAIDIMAI

Pirkimo/Pardavimo/Mainymo temose nepamirškite nurodyti savo susiekimo kontaktų (Discord,Skype,Telegram).
Mes laikomės BDAR (Bendrojo Duomenų Apsaugos Reglamento) ir neteikiame jokios informacijos projektų/serverių administracijai apie narių parduodamus projektų/serverių turtus.

Ši tema yra neaktyvi. Paskutinis pranešimas šioje temoje buvo prieš 107 dienas (-ų). Patariame sukurti naują temą, o ne rašyti naują pranešimą.

Už neaktyvių temų prikėlimą galite sulaukti įspėjimo ir pranešimo pašalinimo!

Recommended Posts

(redaguota)
Spoiler

import cv2
import pyautogui
import numpy as np
import time
from datetime import datetime

# Function to print with timestamp
def print_with_timestamp(message):
    timestamp = datetime.now().strftime("%H:%M:%S")
    print(f"[{timestamp}] {message}")

# Path to the uploaded template image
template_path = "obuolys.png"

# Load the template image
template = cv2.imread(template_path, 0)  # Load in grayscale
if template is None:
    print_with_timestamp(f"Error: Could not load image at path '{template_path}'. Please check the file path and integrity.")
    exit()

# Resize the template image (optional, only if needed)
template = cv2.resize(template, (100, 100))  # Resize to desired dimensions
w, h = template.shape[::-1]

# Define the search region (Left: 861, Top: 887, Width: 198, Height: 192)
region = (850, 900, 200, 200)

# Wait 30 seconds before starting
print_with_timestamp("Obolenka startuos po 5 sek.")
time.sleep(5)

print_with_timestamp("Looking for the image in the defined region. Press 'Ctrl+C' to exit.")

try:
    while True:
        # Take a screenshot of the specified region
        screenshot = pyautogui.screenshot(region=region)
        screenshot = cv2.cvtColor(np.array(screenshot), cv2.COLOR_RGB2GRAY)

        # Perform template matching
        result = cv2.matchTemplate(screenshot, template, cv2.TM_CCOEFF_NORMED)

        threshold = 0.7
        locations = np.where(result >= threshold)

        # Check matches and press space if found
        if len(locations[0]) > 0:
            print_with_timestamp("Obuolys rastas")
            pyautogui.press("space")
            time.sleep(0.1)  # Prevent spamming space key

except KeyboardInterrupt:
    print_with_timestamp("Program stopped by user.")

Nuotrauka: https://imgur.com/qh6onyKhttps://imgur.com/qh6onyK (nepamirštam nuotraukos renamint į obuolys.png)

Daugiau - discord: cidzejus.

Redaguota , nario Cidzejus
  • Cidzejus pakeitė pavadinimą į LMG5.LT Obuolių automatinis rinkimo script'as
  • ,

Ši tema yra neaktyvi. Paskutinis pranešimas šioje temoje buvo prieš 107 dienas (-ų). Patariame sukurti naują temą, o ne rašyti naują pranešimą.

Už neaktyvių temų prikėlimą galite sulaukti įspėjimo ir pranešimo pašalinimo!

Prisijungti prie diskusijos

Palikti atsakymą galite iš karto, o užsiregistruoti vėliau. Jeigu jau turite paskyrą mūsų forume, Prisijunkite.

Svečias
Atsakyti šioje temoje...

×   Įklijuotas tekstas turi teksto formatavimą.   Pašalinti teksto formatavimą

  Galimi tik 75 veidukai.

×   Nuoroda buvo automatiškai įterpta.   Įterpti nuorodą paprastai

×   Jūsų ankstesnis pranešimas buvo atkurtas.   Išvalyti redaktorių

×   Jūs negalite įkelti nuotraukas tiesiogiai.Įkelkite arba įdėkite nuotraukas iš URL.

Skelbimai



×
×
  • Sukurti naują...