Solved Convert seconds into hh:mm:ss

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

xendercrafterx

New Member
May 28, 2018
5
0
0
36
Hi how can I start counting up in seconds from when I type a command and then have another command which will stop the counting up, and then tell me how long it was between each command.

For example: I type /command1 I wait a bit then I type /command2 and say I waited 10 seconds between typing each one, it will say, that command took you 00:00:10.
 
set a loop that continuously adds 1 to a variable every second once that variable reaches 60 it adds 1 to another variable(being minutes) and once again when that reaches 60 add one to another variable being hours? then another command to stop the loop
 
code_language.skript:
command /timer<text>:
    trigger:

      if arg-1 = "start":
          set {Timer} to now
    
      else if arg-2 = "stop":
          set {_timespan} to difference between {Timer} and now
          send "%{_timespan}%"
          delete {Timer}
 
Status
Not open for further replies.