#Time conversion script

1 messages · Page 1 of 1 (latest)

opaque iris
#

Is there any script that converts seconds, minutes, or hours into a dynamic display of time - for example, an hour-timer with the value of 48 would be converted to say "2 days" for better readability to users.

(Not sure if I'm allowed to post this here as I'm not really looking to make my own one - I mean, I could, but it's not my priority - so sorry if this is wrong)

undone oriole
#

i mean

if {hour} = 48:
  remove 48 from {hour}
  add 2 to {day}
opaque iris
#

but then i have to have tons of if-thens for each unit of time

#

i thought it would be very complicated 😅

undone oriole
#

Idk

#

Depends on what you are doing

sinful kestrel
#

Prob some stuff in snippets or showcase. Just search ”time” or something

opaque iris
#

I think I found one!

opaque iris
#
                    stringToTimespan({dailymarket::quest::%{_count}%::timeleft})
                    send {dailymarket::quest::%{_count}%::timeleft} to all players```
i tried doing this, but i don't think this is how it works, as it prints the same number twice.
#

kind of assumed it would modify the variable you input

#

oh maybe it's because it's not a string