Timing 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 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!

Status
Not open for further replies.

JustADev

Well-Known Member
Apr 8, 2017
379
9
18
22
Q:
How do I make this remove 1 second while {Time::%player%} is set?

Code:
code_language.skript:
command /dailyrewards:
    description: Rewards command
    trigger:
        wait 1 tick
        open chest with 1 row named "Daily Rewards" to player
        wait 1 tick
        if {Time::%player%} is not set:
            format gui slot 0 of player with 1 light green stained glass pane named "&aDaily Reward" with lore "||&eCondition: &aReady||||&eClick to collect reward" to run player command "/w385vc5" with left click
        else:
            format gui slot 0 of player with 1 red stained glass pane named "&c&lReward" with lore "||&eCondition: &cLocked||&eTime Left: &c%{Time::%player%}%||&cYour reward is on a timer" to run player command "/w385vc5" with left click
        
        
command /w385vc5:
    description: Daily Reward 1
    trigger:
        if {Time::%player%} is less than 86400 seconds:
            stop
            close player's inventory
            send "&cReward &8&l» &7You must wait &a%{Time::%player%}% &7to claim this reward"
        else:
            send "&cReward &8&l» &7You have claimed your daily reward" to player
            play "ORB_PICKUP" to player at volume 1
            send "&cReward &8&l» &7You have received &a5 XP"
            close player's inventory
            make console execute command "xp add %player% 5"
            set {Time::%player%} to 86400
 
Status
Not open for further replies.