Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Комбо тапы. Моя реализация #67

Open
tamper000 opened this issue Jun 16, 2024 · 2 comments
Open

Комбо тапы. Моя реализация #67

tamper000 opened this issue Jun 16, 2024 · 2 comments

Comments

@tamper000
Copy link

tamper000 commented Jun 16, 2024

В новом обновлении завезли комбо

UNLOCK SECRET REWARD COMBO📦

We've just introduced a new feature that can get you 1,000,000 coins!

Tap in different screen regions & find a special combo of clicks 👀

New combo every day.

Экран делится на 4 части (голова босса - 1, шея босса - 2, живот босса - 3, ноги босса - 4). Нужно потыкать в определенном порядке и получаем халявный лям (обновили, уже 2!)

Моя реализация

  1. в классе Tapper создаем список всех возможных комбинаций:
class Tapper:
    def __init__(self, tg_client: Client):
        self.session_name = tg_client.name
        self.tg_client = tg_client

        self.GRAPHQL_URL = 'https://api-gw-tg.memefi.club/graphql'

        digits = [1, 2, 3, 4]
        combinations = list(itertools.product(digits, repeat=4))
        self.vectors = []
        for combination in combinations:
            self.vectors.append(''.join(map(str, combination)))
  1. Корректируем send_taps:
async def send_taps(self, http_client: aiohttp.ClientSession, nonce: str, taps: int):
       vector = []
       for _ in range(taps//4):
           if len(self.vectors) == 0:
               break
               
           random_vector = choice(self.vectors)
           self.vectors.remove(random_vector)
           vector += list(random_vector)

       for _ in range(taps-len(vector)):
           vector.append(str(randint(1,4)))

       vector = ','.join(vector)
       
       try:
           json_data = {
               'operationName': OperationName.MutationGameProcessTapsBatch,
               'query': Query.MutationGameProcessTapsBatch,
               'variables': {
                   'payload': {
                       'nonce': nonce,
                       'tapsCount': taps,
                       'vector': vector
                   },
               }
           }

           response = await http_client.post(url=self.GRAPHQL_URL, json=json_data)
           response.raise_for_status()

           response_json = await response.json()
           profile_data = response_json['data']['telegramGameProcessTapsBatch']

           return profile_data
       except Exception as error:
           logger.error(f"{self.session_name} | Unknown error when Tapping: {error}")
           await asyncio.sleep(delay=3)

Что думаете?

@asafov
Copy link
Contributor

asafov commented Jun 30, 2024

Выглядит вроде неплохо, проблема только в том, что комбо наверняка обновляется раз в сутки или чаще/реже.
Соответственно надо бы массив комбинаций пересобирать.

@iskizreal
Copy link

Было бы отлично реализовать комбо

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants