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!

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

[SKRIPT] Formatted Countdown

Discussion in 'Requests' started by DavidWasHere, Nov 14, 2020.

  1. DavidWasHere

    DavidWasHere New Member

    Joined:
    Nov 14, 2020
    Messages:
    6
    Likes Received:
    0
    Category: Skript?

    Suggested name: Countdown

    Spigot/Skript Version: 1.16.3

    What I want:
    A formatted countdown (03:00, 02:59 etc) that works in the scoreboard

    Ideas for commands:
    /countdown start [minutes] (For example: /countdown start 6)
    /countdown pause
    /countdown stop

    Ideas for permissions:
    None

    When I'd like it by: Anytime
     
  2. Purple Pixel

    Purple Pixel Member

    Joined:
    Sep 23, 2020
    Messages:
    40
    Likes Received:
    3
    I'd like to know if you have any scoreboard setup yet and if you are planning to have one in order to do this.
     
  3. DavidWasHere

    DavidWasHere New Member

    Joined:
    Nov 14, 2020
    Messages:
    6
    Likes Received:
    0
    yes i do have a scoreboard setup already
     
  4. FireRoz

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    6
    ima try and do it but idk how its gonna go. dont expect for too much
    --- Double Post Merged, Nov 29, 2020, Original Post Date: Nov 29, 2020 ---
    I looked deeper into this and I just realized I coded a whole skript breaking my head how to make a pause. when I realized u want it on scoreboard and on 1.16 which I dont code at.
    good job me
    good reading skills
     
    • Funny Funny x 1
  5. bpitcher2013

    bpitcher2013 Member

    Joined:
    Jan 25, 2020
    Messages:
    14
    Likes Received:
    1
    Code (Text):
    1. options:
    2.     prefix: &3Countdown &8>
    3. #messages
    4.     permission: countdown.use
    5.     nopermission: &cYou don't have permission to set the Countdown
    6.     TooMuch: &cThis Argument is too much
    7.     CountdownSet: &6The &3Countdown &6was set to &c%{Counter.Zahl}%
    8.     Finish: &cCountdown finished
    9.    
    10. #----------------------------------------------------------------------------------      
    11. command /countdown [<number>]:
    12.     trigger:
    13.         if player has the permission "{@permission}":
    14.             if arg isn't set:
    15.                 send "{@prefix} &7Argumente&8: &c1 &8- &c60"
    16.                 stop trigger
    17.             if arg 1 is greater than 60:
    18.                 send "{@prefix} {@TooMuch}"
    19.                 stop
    20.             set {Counter.Zahl} to arg 1
    21.             set {Counter.Online} to true
    22.             loop {Counter.Zahl} times:
    23.                 if {Counter.Online} is true:
    24.                     make player execute command "scoreboard-refresh"
    25.                     broadcast "{@prefix} {@CountdownSet}"
    26.                     remove 1 from {Counter.Zahl}
    27.                     wait 1 second  
    28.                     if {Counter.Zahl} is 0:
    29.                         if {Counter.Online} is true:
    30.                             set {Counter.Online} to false
    31.                             broadcast "{@prefix} {@Finish}"
    32.                             make player execute command "scoreboard-aus"
    33.                             stop
    34.         else:
    35.             send player title "{@prefix}" with subtitle "{@nopermission}" for 2 seconds
    36.             send action bar from "{@prefix} {@nopermission}" to player
    37.             message "{@prefix} {@nopermission}"
    38. command /scoreboard-refresh:
    39.     trigger:
    40.         wipe player sidebar
    41.         set name of sidebar of player to  " "
    42.         wipe player sidebar
    43.         set name of sidebar of player to "{@prefix}"
    44.         set score "&7▬▬▬&8▬▬▬▬▬▬▬▬▬▬▬▬▬▬&7▬▬▬" in sidebar of player to 4
    45.         set score "&3Countdown:" in sidebar of player to 3
    46.         set score "&a» &7%{Counter.Zahl}% &3sec" in sidebar of player to 2
    47.         set score "&8▬▬▬&7▬▬▬▬▬▬▬▬▬▬▬▬▬▬&8▬▬▬" in sidebar of player to 1
    48.        
    49. command /scoreboard-aus:
    50.     trigger:
    51.         wipe player sidebar
    52.         set name of sidebar of player to  " "
     
  6. FireRoz

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    6
    i dont feel like i should interrupt, but he said a pause & a cancel.
     

Share This Page

Loading...