Solved Cooldown without message.

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

AndrewKopera

Member
Mar 18, 2021
18
0
1
24
Hello.
I have a "NPC" dialog Skript on my server. It's super simple but i wanted to add a cooldown so people don't spam the dialog.
I know there is the:
Code:
cooldown: 10 seconds
cooldown message: No
but then it spams the cooldown message.
How can I make it so that it doesn't say anything and just stops the command?
My "NPC" dialog:
Code:
command /npctalk1:
    cooldown: 5 seconds
    trigger:
        chance of 50%:
            send "&c&lGuard: &fNo!" to player
            stop
        chance of 50%:
            send "&c&lGuard: &fHello." to player
            stop
        chance of 100%:
            send "&c&lGuard: &fHey!" to player
            stop

Side notes:
I put NPC into quotation marks because what i really mean are armor stands.
The messages don't look like this. They're in Czech (my native language) and I just changed it random messages to fill the place.


Thanks a lot.
 
The code looks like this.
Code:
variables:
   {%player%::guard} = 1

command /npctalk1:
    cooldown: 5 seconds
    trigger:
        chance of 50%:
          send "&c&lGuard: &fNo!" to player
          set {%player%::guard} to 0
          wait 5 seconds
          set {%player%::guard} to 1
          stop
        chance of 50%:
          send "&c&lGuard: &fHello." to player
          set {%player%::guard} to 0
          wait 5 seconds
          set {%player%::guard} to 1
          stop
        chance of 100%:
          send "&c&lGuard: &fHey!" to player
          set {%player%::guard} to 0
          wait 5 seconds
          set {%player%::guard} to 1
          stop
 
Status
Not open for further replies.