mpcabete / bombcrypto-bot

This is a python bot that automatically logs in, clicks the new button, and sends heroes to work in the bombcrypto game. It is fully open source and free.
817 stars 540 forks source link

Sugestão: Clicar no botão "ALL" verde para enviar todos os heróis para o trabalho. #691

Closed dcprj closed 2 years ago

dcprj commented 2 years ago

Atualmente, no código, a lógica de enviar todos os heróis para o trabalho quando a configuração abaixo está como all é clicar em todos os heróis, um a um:

# [pt_BR]
# Valor padrão: green
# Opções disponíveis:
# all   = seleciona todos os heróis (independente da barra de stamina)
# green = seleciona os heróis com a barra de stamina verde (metade ou cheia)
# full  = seleciona somente os heróis com a barra de stamina cheia
select_heroes_mode: "all"

E para realizar esta ação, o bot executa este trecho:

def clickButtons():
    buttons = positions(images['go-work'], threshold=ct['go_to_work_btn'])
    # print('buttons: {}'.format(len(buttons)))
    for (x, y, w, h) in buttons:
        moveToWithRandomness(x+(w/2),y+(h/2),1)
        pyautogui.click(button='SECONDARY')
        global hero_clicks
        hero_clicks = hero_clicks + 1
        #cv2.rectangle(sct_img, (x, y) , (x + w, y + h), (0,255,255),2)
        if hero_clicks > 20:
            logger('too many hero clicks, try to increase the go_to_work_btn threshold')
            return
    return len(buttons)

Seria possível, em vez de clicar em todos os heróis, um a um, clicar apenas no botão "ALL" verde, conforme imagem abaixo? 2022-01-27_10h05_22

E assim selecionar todos os heróis de uma vez?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.