This repository has been archived by the owner on Mar 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
122 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import pyautogui | ||
import time | ||
import cv2 as cv | ||
import logging | ||
from colorama import * | ||
from termcolor import colored,cprint | ||
init(autoreset=True) #Permette ad ogni print di ritornare al suo colore base | ||
|
||
|
||
error = colored("Please report this bug/error on github",'red') | ||
|
||
|
||
def invasione(run, tempo): | ||
print(colored("\n-----INVASIONE-----", 'cyan', attrs=['bold'])) | ||
print(colored("run = ", 'green', attrs=['bold']), colored(run, 'white'), colored(" e durata = ", 'green', attrs=['bold']), | ||
colored(tempo, 'white'), colored("secondi\n", 'green', attrs=['bold'])) | ||
conta = 1 | ||
logging.debug(f"run = {run}, time = {tempo}") | ||
if run < 0: | ||
logging.debug("Run < 0") | ||
pyautogui.alert(text="Run must be > 0", button="OK") | ||
return 0 | ||
else: | ||
if run == 0: | ||
print(colored("Skip Prove di Nyxn",'red', attrs=['bold'])) | ||
return 0 | ||
else: | ||
invasionebutton = pyautogui.locateCenterOnScreen(r"image\invasione.png", grayscale=False, confidence=0.5) | ||
logging.debug(f"bottone invasione = {invasionebutton}") | ||
if invasionebutton is not None: | ||
pyautogui.click(invasionebutton) | ||
while True: | ||
time.sleep(3) | ||
play = pyautogui.locateCenterOnScreen(r"image\play.png", grayscale=False, confidence=0.5) | ||
logging.debug(f"play = {play}") | ||
if play is not None: | ||
pyautogui.click(play) | ||
time.sleep(3) | ||
accept = pyautogui.locateCenterOnScreen(r"image\accept.png", grayscale=False, confidence=0.5) | ||
logging.debug(f"accept = {accept}") | ||
if accept is not None: | ||
pyautogui.click(accept) | ||
print(colored("Giro numero = ", 'green', attrs=['bold']), colored(conta, 'white')) | ||
time.sleep(int(tempo)) | ||
close = pyautogui.locateCenterOnScreen(r"image\close.png", grayscale=False, confidence=0.5) | ||
logging.debug(f"close = {close}") | ||
if close is not None: | ||
pyautogui.click(close) | ||
time.sleep(5) | ||
run = int(run) - 1 | ||
conta = int(conta) + 1 | ||
if int(run) == 0: | ||
time.sleep(3) | ||
xbutton = pyautogui.locateCenterOnScreen(r"image\xbutton.png", grayscale=False, | ||
confidence=0.5) | ||
if xbutton is not None: | ||
pyautogui.click(xbutton) | ||
break | ||
else: | ||
logging.debug(f"xbutton = {xbutton}") | ||
print(error) | ||
break | ||
else: | ||
logging.debug("close is None") | ||
print(error) | ||
break | ||
else: | ||
logging.debug("accept is None") | ||
print(error) | ||
break | ||
else: | ||
logging.debug("play is None") | ||
print(error) | ||
break | ||
#End while -> tutto ok | ||
return 1 | ||
else: | ||
logging.debug(f"problem with invasione.png. return = {invasionebutton} ") | ||
cprint("Invasione non disponibile o non lo trovo!", 'red', attrs=['bold']) | ||
print(error) | ||
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
2021-03-19 01:23:01,163 - main : VERSION : 3.1 - BOT by HoloKi. Info : https://github.com/HoloKi/BitHeroesBot | ||
2021-03-19 01:23:04,125 - menu : Menu input = 10 | ||
2021-03-19 01:24:01,261 - menu : Menu input = 10 | ||
2021-03-19 01:24:07,547 - menu : Menu input = 6 | ||
2021-03-19 01:24:13,055 - prove : run = 1, time = 200 | ||
2021-03-19 01:24:13,304 - prove : bottone prove = Point(x=815, y=263) | ||
2021-03-19 01:24:16,726 - prove : play = Point(x=588, y=348) | ||
2021-03-19 01:24:20,112 - prove : accept = None | ||
2021-03-19 01:24:20,112 - prove : accept is None | ||
2021-03-19 01:28:22,859 - menu : Menu input = 6 | ||
2021-03-19 01:28:27,604 - prove : run = 2, time = 200 | ||
2021-03-19 01:28:27,859 - prove : bottone prove = Point(x=815, y=263) | ||
2021-03-19 01:28:31,271 - prove : play = Point(x=588, y=348) | ||
2021-03-19 01:28:34,650 - prove : accept = Point(x=561, y=522) | ||
2021-03-19 01:31:55,055 - prove : close = Point(x=391, y=424) | ||
2021-03-19 01:32:03,453 - prove : play = Point(x=588, y=348) | ||
2021-03-19 01:32:06,807 - prove : accept = Point(x=561, y=522) | ||
2021-03-19 17:59:15,647 - main : VERSION : 3.1 - BOT by HoloKi. Info : https://github.com/HoloKi/BitHeroesBot | ||
2021-03-19 18:00:53,463 - menu : Menu input = 10 | ||
2021-03-19 18:00:59,935 - menu : Menu input = 2 | ||
2021-03-19 18:01:03,180 - pvp : run = 3 | ||
2021-03-19 18:01:03,424 - pvp : pvp button = Point(x=76, y=177) | ||
2021-03-19 18:01:05,816 - pvp : play = Point(x=577, y=324) | ||
2021-03-19 18:01:08,195 - pvp : battle = Point(x=630, y=254) | ||
2021-03-19 18:01:10,546 - pvp : accept = Point(x=554, y=504) | ||
2021-03-19 18:01:50,941 - pvp : close = Point(x=441, y=489) | ||
2021-03-19 18:01:55,343 - pvp : play = Point(x=577, y=324) | ||
2021-03-19 18:01:57,695 - pvp : battle = Point(x=630, y=254) | ||
2021-03-19 18:02:00,061 - pvp : accept = Point(x=554, y=504) | ||
2021-03-19 18:02:40,463 - pvp : close = Point(x=441, y=489) | ||
2021-03-19 18:02:44,852 - pvp : play = Point(x=577, y=324) | ||
2021-03-19 18:02:47,211 - pvp : battle = Point(x=630, y=254) | ||
2021-03-19 18:02:49,564 - pvp : accept = Point(x=554, y=504) | ||
2021-03-19 18:03:29,937 - pvp : close = Point(x=441, y=489) | ||
2021-03-19 18:03:32,293 - pvp : xbutton = Point(x=673, y=172) |