How to make Daily login reward script?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

mali

Member
May 21, 2024
1
0
1
19
How to make Daily login reward script? It be first day, two day, third day... 7. day rewards.
 
A system like this will give them a reward every time they log in after 24 hours, and then update the time after every day they log in, the only problem is that on large servers, this could end up with hundreds or even thousands of variables, so it may be a better ideas to store this in a file or the player's PDC.

AppleScript:
on join:
    {join::%player's uuid%} is not set:
        set {join::%player's uuid%} to now
        stop
    if (difference between now and {join::%player's uuid%}) is less than 24 hours:
        stop
    set {join::%player's uuid%} to now
    set short tag "days" of player to 0 if byte tag "days" of player is not set
    add 1 to short tag "days" of player