Solved Cooldown On Skript

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

Bindro

Member
Sep 11, 2023
3
0
1
24
Hello there!

I've been struggling to make a 24 hour cooldown on a Skript that gives you a crate key daily, everything I saw online didn't work in my Skript (Probably because I don't know what I'md doing.) Could someone help out?

Here is a Pastebin link https://pastebin.com/tb7H0Qz6 (I don't know if this is how to do it so I will also add the skript itself underneath here.)

command /daily:
trigger:
if player does not have permission "daily.wood":
send "&cYou Do Not Have Any Rank, Use /Coinshop To Get One"
stop
else:
player has permission "daily.wood"
execute console command "give %player% oak_log 1"

player has permission "daily.Stone"
execute console command "give %player% stone 1"

player has permission "daily.Copper"
execute console command "give %player% copper_block 1"

player has permission "daily.Amethyst"
execute console command "give %player% amethyst_block 1"

player has permission "daily.Obsidian"
execute console command "give %player% obsidian 1"
 
above trigger: you can add cooldown

Code:
command /daily:
  cooldown: 24 hours
  cooldown storage: {daily::%player's uuid%}

you need to use cooldown storage for long cooldowns or its gonna get deleted when the server restarts.
 
above trigger: you can add cooldown

Code:
command /daily:
  cooldown: 24 hours
  cooldown storage: {daily::%player's uuid%}

you need to use cooldown storage for long cooldowns or its gonna get deleted when the server restarts.

Thank you so much!