MemeFiBot
MemeFiBot copied to clipboard
Комбо тапы. Моя реализация
В новом обновлении завезли комбо
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!)
Моя реализация
- в классе 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)))
- Корректируем 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)
Что думаете?
Выглядит вроде неплохо, проблема только в том, что комбо наверняка обновляется раз в сутки или чаще/реже. Соответственно надо бы массив комбинаций пересобирать.
Было бы отлично реализовать комбо