From 3e045d4ebf7a95f3ce798361541b16b3e59b7420 Mon Sep 17 00:00:00 2001 From: Khiem Vo <8721247+HoloKi@users.noreply.github.com> Date: Wed, 21 Jul 2021 22:47:02 +0200 Subject: [PATCH] fixes --- PvPClass.py | 35 ++++++++++++++++++----------------- bot.py | 2 +- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/PvPClass.py b/PvPClass.py index aeec8bd..1e7af5f 100644 --- a/PvPClass.py +++ b/PvPClass.py @@ -4,7 +4,7 @@ import logging import asyncio from colorama import * -from termcolor import colored,cprint +from termcolor import colored, cprint import classe init(autoreset=True) # Permette ad ogni print di ritornare al suo colore base @@ -12,29 +12,29 @@ def pvp(run): error = colored("Please report this bug/error on github or discord\n", 'red', attrs=['bold']) - #Case run <=0 - if run<=0: - print(colored("Run <=0, skip PvP",'red')) + # Case run <=0 + if run <= 0: + print(colored("Run <=0, skip PvP", 'red')) logging.debug("Run<=0") return 0 else: print(colored("\n-----PVP-----", 'cyan', attrs=['bold'])) print(colored("run = ", 'green', attrs=['bold']), colored(run, 'white'), colored("\n")) - #load class------------------------------------- - pvp = classe.bit(r"image\pvp.png",0.5) - play = classe.bit(r"image\play.png",0.4) - select = classe.bit(r"image\battle2.png",0.5) - accetta = classe.bit(r"image\accept.png",0.5) - defeat = classe.bit(r"image\defeat.png",0.7) - chiudi = classe.bit(r"image\chiudi.png",0.5) - #----------------------------------------------- + # load class------------------------------------- + pvp = classe.bit(r"image\pvp.png", 0.5) + play = classe.bit(r"image\play.png", 0.4) + select = classe.bit(r"image\battle2.png", 0.5) + accetta = classe.bit(r"image\accept.png", 0.5) + defeat = classe.bit(r"image\defeat.png", 0.7) + chiudi = classe.bit(r"image\chiudi.png", 0.5) + # ----------------------------------------------- conta = 0 errore = pvp.bottone() if errore == 0: cprint(error) return 0 while True: - perso=False + perso = False conta = int(conta) + 1 errore = play.bottone() if errore == 0: @@ -54,7 +54,7 @@ def pvp(run): # check if he die--------------- error = defeat.ispresence() if error == 1: # if he die click - perso=True + perso = True print("Match Lost") if error == 0: print("Winner!") @@ -67,7 +67,7 @@ def pvp(run): pyautogui.press('esc') return 1 else: - if perso==True: + if perso == True: chiudi.bottone() time.sleep(2) else: @@ -82,12 +82,13 @@ async def fine(): while True: await asyncio.sleep(1) test = morte.ispresence() - if test==1: + if test == 1: return 2 test = fine.ispresence() - if test==1: + if test == 1: return 1 + async def test(): prova = asyncio.create_task(fine()) await prova diff --git a/bot.py b/bot.py index e865e8b..6bece69 100644 --- a/bot.py +++ b/bot.py @@ -186,7 +186,7 @@ def daily(): data = json.loads(f.read()) raidshard = int(data['raid']) pvprun = int(data['pvp']) - cimentorun = int(data['cimento']) + cimentorun = int(data['gauntlet']) print(raidshard) AutoRaid.raid(int(raidshard), hero) time.sleep(5)