From 4a49afb826528b846e9ca7538bbbca0d3a9cca24 Mon Sep 17 00:00:00 2001 From: Khiem Vo <8721247+HoloKi@users.noreply.github.com> Date: Fri, 19 Mar 2021 18:09:48 +0100 Subject: [PATCH] beta release --- Invasion.py | 81 ++++++++++++++++++++++++++++ PvP.py | 2 +- __pycache__/Invasion.cpython-39.pyc | Bin 0 -> 1996 bytes __pycache__/PvP.cpython-39.pyc | Bin 2498 -> 2498 bytes bot.py | 28 +++++++--- image/accept.png | Bin 3292 -> 3387 bytes latest.log | 35 ++++++------ 7 files changed, 122 insertions(+), 24 deletions(-) create mode 100644 Invasion.py create mode 100644 __pycache__/Invasion.cpython-39.pyc diff --git a/Invasion.py b/Invasion.py new file mode 100644 index 0000000..724c036 --- /dev/null +++ b/Invasion.py @@ -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 diff --git a/PvP.py b/PvP.py index 0e6f619..5194330 100644 --- a/PvP.py +++ b/PvP.py @@ -39,7 +39,7 @@ def pvp(run): if battle is not None: pyautogui.click(battle) time.sleep(2) - accept = pyautogui.locateCenterOnScreen(r"image\accept.png", grayscale=False, confidence=0.5) + accept = pyautogui.locateCenterOnScreen(r"image\accept.png", grayscale=False, confidence=0.9) logging.debug(f"accept = {accept}") if accept is not None: pyautogui.click(accept) diff --git a/__pycache__/Invasion.cpython-39.pyc b/__pycache__/Invasion.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..70481fef6459825bcbbd32f7659b9507765c71ee GIT binary patch literal 1996 zcmZuyPj4GV6yMqZ-q=o>hBQE+Q)tr~L5Mh_QXt`9gyd8tMU~|P>z!et(K?3`1#Mh zZ+@BAw7(^DaTvgS1i$<~Ohh9n)_T>7dPwnl&rqw`Ghx+ZYftKp*d97PXXy4^q|pX3 ziFJa2a)?cwiQe;wOB&y6y*Yw*wT^cN=vudf1bVBZ3nxh9lu;t=AY)O&_dwC`3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=`Z#^pe78UtQ@= z+D7e;h&ovb!`KGVH7xN#Lqnr%BW|^@&2@Ej;?ilQaYo!OVulwpe^1WRrAr|N@Kn9n<`HeeVY$*!pTaY%OS`@Kp+1novJBT3<;)JG{G0@6}B3I1k%~zcA+J z=E9sgb3|?g9^Dh=2-|JK7R%eS-n8%d)N!Z1phfBSuxLyDRRL;i=LMF9-3NzL$IYvo8h$CpRVCW=6nK~i#is1Y@Bs_h4D>- zEMgvTer)OqqRG+|LX&C^K3zL}_%NJ3dk)T>J1Ydkb0U3Ke+tI+PsUD8pFSW>+va+%a-Lt}0*NJI7aq;qSwC;3&x?G0>(&6n=M*}W{U+mm_XANHGw7VRS z#>NqGyNI0=$OG*5Fy`Q5KBs+RKYCMs#6x>#=e5oz<@)t9X~&P_CnF+lu3x{d(w)KW zckjc^G)DMEe^2~ncG(kMCdb{|3BuH)Plc(&IS(xPc*l$3QkD*RGXDb=|_YsH58|Y87R;b+u4E*q8G1@~91i@z&Os zs2=tQPhq5vq2~qm6TgQx>#MH5?WhB{6Bx(uFK9eT4^MkYhko_L(+L_&YRCQi_hf!N zgRP6+f9Gp=J*{E@!@oqo*!9ZjnGWpT&<@uwg;ndgndE8Zgs7Q~dMgP{1jS9s^KXP$1_!%F}`=R#& zy7BKY{OOn8M}5fH=l$@_?Tv({OYT<+qPKZg+OLM6$6<3wdZ7LAU&}qq3|aqMTG$P4^dnNpzxo|XaE2J07*qo IM6N<$f))>6(f|Me diff --git a/latest.log b/latest.log index 2aef7de..c38cf7d 100644 --- a/latest.log +++ b/latest.log @@ -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)