import sys sys.dont_write_bytecode = True from orrnob_drops_automation import base from core.token import get_token from core.info import get_info from core.game import process_play_game import time import json class Moonbix: def __init__(self): # Get file directory self.data_file = base.file_path(file_name="data-proxy.json") self.config_file = base.file_path(file_name="config.json") # Initialize line self.line = base.create_line(length=50) # Initialize banner self.banner = base.create_banner(game_name="Moonbix") def main(self): while True: base.clear_terminal() print(self.banner) accounts = json.load(open(self.data_file, "r"))["accounts"] num_acc = len(accounts) base.log(self.line) base.log(f"{base.green}Number of accounts: {base.white}{num_acc}") for no, account in enumerate(accounts): base.log(self.line) base.log(f"{base.green}Account number: {base.white}{no+1}/{num_acc}") data = account["acc_info"] proxy_info = account["proxy_info"] parsed_proxy_info = base.parse_proxy_info(proxy_info) if parsed_proxy_info is None: break actual_ip = base.check_ip(proxy_info=proxy_info) proxies = base.format_proxy(proxy_info=proxy_info) try: token = get_token(data=data, proxies=proxies) if token: get_info(token=token, proxies=proxies) process_play_game(token=token, proxies=proxies) get_info(token=token, proxies=proxies) else: base.log(f"{base.red}Token not found! Please get new query id") except Exception as e: base.log(f"{base.red}Error: {base.white}{e}") print() wait_time = 30 * 60 base.log(f"{base.yellow}Wait for {int(wait_time/60)} minutes!") time.sleep(wait_time) if __name__ == "__main__": try: moonbix = Moonbix() moonbix.main() except KeyboardInterrupt: sys.exit()