Solved Daily stuff help

  • 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 community!

    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!

Status
Not open for further replies.

Aidanete

Active Member
Apr 11, 2017
139
10
0
I want to make a daily reward system, and I think I know a way but I don't know how to do this.

How do I set a variable to actual day and how do I compare a variable to the actual day and make it execute the code if is not the today's date the variable one.

I don't know if I explained well
Example of code:
code_language.skript:
(here will be the code that detects if the day stored in a variable is today):
            message "<light red>You have claimed your reward today, come back tomorrow!"
        else:
            (here I will set the variable detected before to today, so until tomorrow you can't claim this back):
                (rest of code...)

Between "()" there is info of what I want to enter there, but I don't know how. I want to replace things in "()" with the real code.
 
you can use %now%
code_language.skript:
if {lastClaimed::%player%} is now formatted as "MM/dd/yyyy"
    message "<light red>You have claimed your reward today, come back tomorrow!"
else:
    set {lastClaimed::%player%} to now formatted as "MM/dd/yyyy"
 
It says as I have claimed the reward

Sorry, my error, now works fine
 
Last edited:
Status
Not open for further replies.