Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HoloKi committed Jul 21, 2021
1 parent e46899a commit 3e045d4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
35 changes: 18 additions & 17 deletions PvPClass.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@
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


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:
Expand All @@ -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!")
Expand All @@ -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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3e045d4

Please sign in to comment.