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

ASK #91

Open
IMPER1A-V opened this issue Oct 4, 2024 · 3 comments
Open

ASK #91

IMPER1A-V opened this issue Oct 4, 2024 · 3 comments

Comments

@IMPER1A-V
Copy link

Подскажите, можно ли добавить в скрипт сон ночью?

@aDarkDev
Copy link
Owner

aDarkDev commented Oct 4, 2024

yes i will add it in new update

@IMPER1A-V
Copy link
Author

yes i will add it in new update

Очень жду. Не знаю , получится ли рисовка по трафарета . Было бы здорово получать х3 поинты

@IMPER1A-V
Copy link
Author

IMPER1A-V commented Oct 5, 2024

Maybe import pytz
from datetime import datetime

TIMEZONE = 'Europe/Moscow'
SLEEP_START_HOUR = 23 # 23:00
SLEEP_END_HOUR = 7 # 07:00

def is_sleep_time():
tz = pytz.timezone(TIMEZONE)
current_hour = datetime.now(tz).hour
return current_hour >= SLEEP_START_HOUR or current_hour < SLEEP_END_HOUR

//////
def mine_claimer(NotPxClient: NotPx, session_name: str):
time.sleep(5) # start with delay...

print("[+] {}Auto claiming started{}.".format(Colors.CYAN, Colors.END))
while True:
    if is_sleep_time():
        print("[!] {}{}{}: It's sleep time. Pausing until morning...{}".format(Colors.CYAN, session_name, Colors.END, Colors.END))
        while is_sleep_time():
            time.sleep(600)  # Check every 10 minutes
        print("[+] {}{}{}: Waking up and resuming work...{}".format(Colors.CYAN, session_name, Colors.END, Colors.END))
    
    acc_data = NotPxClient.accountStatus()
    
    # Check if acc_data is None
    if acc_data is None:
        print("[!] {}{}{}: {}Failed to retrieve account status. Retrying...{}".format(Colors.CYAN, session_name, Colors.END, Colors.RED, Colors.END))
        time.sleep(5)  # Wait before retrying
        continue
    
    # Check if the necessary keys exist in acc_data
    if 'fromStart' in acc_data and 'speedPerSecond' in acc_data:
        fromStart = acc_data['fromStart']
        speedPerSecond = acc_data['speedPerSecond']
        if fromStart * speedPerSecond > 0.3:
            claimed_count = round(NotPxClient.claim_mining(), 2)
            print("[+] {}{}{}: {} NotPx Token {}claimed{}.".format(
                Colors.CYAN, session_name, Colors.END,
                claimed_count, Colors.GREEN, Colors.END
            ))
    else:
        print("[!] {}{}{}: {}Unexpected account data format. Retrying...{}".format(Colors.CYAN, session_name, Colors.END, Colors.RED, Colors.END))
    
    print("[!] {}{}{}: Checking time again in 10 minutes...".format(Colors.CYAN, session_name, Colors.END))
    time.sleep(600)`

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

2 participants