1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Timing Help

Discussion in 'Skript' started by JustADev, Sep 4, 2017.

Thread Status:
Not open for further replies.
  1. JustADev

    JustADev Well-Known Member

    Joined:
    Apr 8, 2017
    Messages:
    380
    Likes Received:
    9
    Q:
    How do I make this remove 1 second while {Time::%player%} is set?

    Code:
    Code (Skript):
    1. command /dailyrewards:
    2.     description: Rewards command
    3.     trigger:
    4.         wait 1 tick
    5.         open chest with 1 row named "Daily Rewards" to player
    6.         wait 1 tick
    7.         if {Time::%player%} is not set:
    8.             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
    9.         else:
    10.             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
    11.        
    12.        
    13. command /w385vc5:
    14.     description: Daily Reward 1
    15.     trigger:
    16.         if {Time::%player%} is less than 86400 seconds:
    17.             stop
    18.             close player's inventory
    19.             send "&cReward &8&l» &7You must wait &a%{Time::%player%}% &7to claim this reward"
    20.         else:
    21.             send "&cReward &8&l» &7You have claimed your daily reward" to player
    22.             play "ORB_PICKUP" to player at volume 1
    23.             send "&cReward &8&l» &7You have received &a5 XP"
    24.             close player's inventory
    25.             make console execute command "xp add %player% 5"
    26.             set {Time::%player%} to 86400
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,181
    Likes Received:
    220
Thread Status:
Not open for further replies.

Share This Page

Loading...