Esempio n. 1
0
def verifyBattle():
    img = imagesearch(getImageFolder() + 'battleFound.png', precision=0.8)
    if img is not None:
        print("battleFound!")
        sleep(1)
        img = imagesearch_numLoop(getImageFolder() + 'fight.png', 1, 5, precision=0.8)
        if img is not None:
            if 'fight' in Battle.command:
                battle(Battle.command)
Esempio n. 2
0
def healWithPotion(text):
    sleep(1)
    imgClick(getImageFolder() + 'mochila.png', 1, 1)
    sleep(1)
    imgClick(getImageFolder() + 'superPocao.png', 1, 1)
    sleep(1)
    if (text == 'GOLBAT'):
        imgClick(getImageFolder() + 'golbat.png', 1, 1)
    if (text == 'NIDOKING'):
        imgClick(getImageFolder() + 'nido.png', 1, 1)
    sleep(2)
Esempio n. 3
0
def nurseTalk():
    i = 0
    while not imgClick(getImageFolder() + 'yesPlease.png', 1, 1):
        i = i + 1
        pyautogui.typewrite(' ')
        sleep(0.5)
        if i > 5:
            return
    sleep(2)
    for i in range(0, 3):
        pyautogui.typewrite(' ')
        sleep(2)
        messageWindow = imagesearch(getImageFolder() + 'messageWindow.png',
                                    precision=0.8)
        if messageWindow is None:
            return
Esempio n. 4
0
def battle(verifySituationCommand):
    while True:
        if imgClick(getImageFolder() + 'fight.png', 1, 1):
            sleep(0.4)
            if (getIfFindASpecificPokemon() == False):
                if '1' in verifySituationCommand:
                    skill(random.randint(1,4))
            else:
                if imgClick(getImageFolder() + getPokemonToHunt() +'.png', 1, 1):
                    skill(random.randint(1,4))
                else:
                    run()
            sleep(3)
        setAttacksCharged(getAttacksCharged() + 1)

        img = imagesearch(getImageFolder() + 'battleFound.png', precision=0.8)
        if img is None:
            setThingsOK(True)
            return
Esempio n. 5
0
def cancelLearning():
    if imgClick(getImageFolder() + 'learn.png', 1, 1):
        imgClick(getImageFolder() + 'doNotLearn.png', 1, 5)
        imgClick(getImageFolder() + 'confirmNotLearning.png', 1, 5)
Esempio n. 6
0
def cancelEvolving():
    if imgClick(getImageFolder() + 'evolving.png', 1, 1):
        imgClick(getImageFolder() + 'noEvolve.png', 1, 5)
Esempio n. 7
0
def run():
    imgClick(getImageFolder() + 'run.png', 1, 5)
    sleep(2)
Esempio n. 8
0
def verifyFaint():
    if imgClick(getImageFolder() + 'faited.png', 1, 1):
        imgClick(getImageFolder() + 'pokemonChange.png', 1, 5)
        sleep(1)
        skill('2')