#Player time

1 messages · Page 1 of 1 (latest)

vapid ingot
#

I wanna make a skript where every player will join and get his time (for example 3 hours) with countdown, but I don't want to set hours, minutes and seconds as certain variable ({min::%player's uuid%} and so on). So is it possible to make this as only one variable? And if it is - how can I make calculation with that (for example 3 hours + 5 hours)

dire lichen
#

Eeeeh?

#

You can use playtime expression

past tulip
vapid ingot
#

now it looks like this

past tulip
vapid ingot
#

uh, i see

#

i'll try

#

I think it's not that I want

#

it can show you real time, but not what I want

past tulip
#

it is what you want

#

%date% formatted as "HH:mm:ss"

vapid ingot
#

but it's like a real time

#

or I don't get you?

#

Oohh maybe I understand

#
    trigger:
        set {_a} to time played of player
        set {_t} to {_a} formatted as "HH:mm:ss"
        send "%{_t}%" to player```
no error but do not work
quartz stag
#

Yeah that expression only works for dates, not timespans

#

You'll have to do the format manually by getting the ticks with skjade or reflect, and then doing math

#

I believe there's a snippet for it?

hexed nexus
#

something like this might also work

set {_tmp} to unix timestamp of (time played of player from date(1970, 1, 1))
set {_fmt} to unix date of {_tmp} formatted as "HH:mm:ss"
send "%{_fmt}%"
#

i think that might break for times longer than a day though

snow mulch
quartz stag
#

See the latest snippet

vapid ingot
#

okeeey so what is that?

vapid ingot
quartz stag
#

That's reflect

#

Like I said, get ticks with skjade or reflect

#

They're just dividing by 20 to get seconds in that example

vapid ingot
#

So I can't make that I want using just skript?

quartz stag
#

Bluehf's method may work, but if you want fine control, you kinda need an addon

vapid ingot
quartz stag
#

he did say that yes

vapid ingot
#

So the best solution for me is to leave it like it is now, where every hour, minute and second is a variables

hexed nexus
#

the usage example is located helpfully in the Middle of all the mess

vapid ingot
#

yoo what it that

quartz stag
#

but blue's monstrosity will also work lol

hexed nexus
#

i'm making a nicer one atm

hexed nexus
vapid ingot
#

this looks so difficult for me