Jump to content

Cooldowns


Triu

Recommended Posts

So i didnt know how to do a cooldown and i needed to make one for a command, And i couldnt find out how to on here, so for those that are looking this is how you do a cooldown

command /test:
#permissions would go here
    Cooldown 3 seconds
    Cooldown message: "You are on cooldown rn"
    trigger:
#what ever you want
 

Link to comment
Share on other sites

I need a more advanced one because I also work with arguments, so I need to apply the cooldown only if you make a command correctly and just ignore the cooldown when doing it wrong

Owner of DrkMines.minehut.gg

+=================================+

[VIP] on 23/10/2021

+=================================+

1 year living out from Skripting and CopyPasting 

Looking out for the Owner of DarkMines.minehut.gg (Bcz I want to buy his name)

Link to comment
Share on other sites

3 hours ago, minecon099 said:

I need a more advanced one because I also work with arguments, so I need to apply the cooldown only if you make a command correctly and just ignore the cooldown when doing it wrong

#Set the cooldown variable e.g '{test.cool.%player's uuid%}' to now when they run the command correctly. I hope this helped!

options:
    prefix: &8[&7Test&8]&7
    permission: test.run
    pm: Unknown command. Type ""/help"" for help!
    #Permission message ^^
    ct: 15 seconds
    #Cooldown time ^^

command /test [<text>]:
    permission: {@permission}
    permission message: {@p}
    trigger:
        set {_test.cool} to difference between {test.cool.%player's uuid%} and now
        if {_test.cool} is less than {@ct}:
            send "{@prefix} You need to wait &8'&b%difference between {test.cool} and {@ct}%&8' &7before using this command again!"
            stop
        if arg-1 = "...":
            send "{@prefix} Hey, it worked!"
            set {test.cool.%player's uuid%} to now

 

Edited by Ramina__
Link to comment
Share on other sites

1 minute ago, Ramina__ said:

#Set the cooldown variable e.g '{test.cool.%player's uuid%}' to now when they run the command correctly. I hope this helped!

options:
    prefix: &8[&7Test&8]&7
    permission: test.run
    pm: Unknown command. Type ""/help"" for help!
    #Permission message ^^
    ct: 15 seconds
    #Cooldown time ^^

command /test [<text>]:
    permission: {@permission}
    permission message: {@p}
    trigger:
        set {_test.cool} to difference between {test.cool.%player's uuid%} and now
        if {_test.cool} is less than {@ct}:
            send "{@prefix} You need to wait &8'&b%difference between {test.cool} and {@ct}%&8' &7before using this command again!"
            stop
        if arg-1 = "...":
            send "{@prefix} Hey, it worked!"
            set {test.cool.%player's uuid%} to now

 

You don't need all the options, I just put them there to show you how to configure it!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...