Jump to content

Script | Playtime


SuperOrca
 Share

Recommended Posts

command /playtime [<offline player>]:
    trigger:
        if arg-1 is set:
            send "&6&lPLAYTIME&7 %arg-1%'s playtime is %{playtime::%arg-1's uuid%}%."
        else:
            send "&6&lPLAYTIME&7 Your playtime is %{playtime::%player's uuid%}%."

every 2 seconds:
    loop all players:
        add "2 seconds" parsed as a timespan to {playtime::%loop-player's uuid%}

 

 

like.gif.653e1b24da93a6ca10eaf5b04e7f0242.gif

Likes are appreciated ❤️

 

Username: SuperOrca

Discord: Link to Profile

Rank: [VIP]

Joined Minehut: August 10, 2017

Joined Forums: June 10, 2019

 

Experienced in Python, Java (mainly spigot), Javascript (node.js, basics of react.js), and Web Development. DM on discord me if you want a custom discord bot for your server (i'm bored).

Link to comment
Share on other sites

why use 2 seconds?

also, you should do something like this for the command:

command /playtime [<offlineplayer>]:

    trigger:

        set {_p} to arg ? player

        set {_u} to {_p}'s uuid

        send "&6&lPLAYTIME&7 %{_p}%'s playtime is %{playtime::%{_u}%} ? 0 seconds%."

        

Discord: MrScopes#5548

Link to comment
Share on other sites

  • 2 weeks later...
On 6/28/2019 at 10:33 PM, ecstacide said:

timestamps would be more efficient

Yeah, but I was lazy...


Excuses

 

like.gif.653e1b24da93a6ca10eaf5b04e7f0242.gif

Likes are appreciated ❤️

 

Username: SuperOrca

Discord: Link to Profile

Rank: [VIP]

Joined Minehut: August 10, 2017

Joined Forums: June 10, 2019

 

Experienced in Python, Java (mainly spigot), Javascript (node.js, basics of react.js), and Web Development. DM on discord me if you want a custom discord bot for your server (i'm bored).

Link to comment
Share on other sites

On 6/28/2019 at 11:53 PM, MrScopes said:

why use 2 seconds?

also, you should do something like this for the command:


command /playtime [<offlineplayer>]:

    trigger:

        set {_p} to arg ? player

        set {_u} to {_p}'s uuid

        send "&6&lPLAYTIME&7 %{_p}%'s playtime is %{playtime::%{_u}%} ? 0 seconds%."

        

You learn something new everyday.


Excuses

 

like.gif.653e1b24da93a6ca10eaf5b04e7f0242.gif

Likes are appreciated ❤️

 

Username: SuperOrca

Discord: Link to Profile

Rank: [VIP]

Joined Minehut: August 10, 2017

Joined Forums: June 10, 2019

 

Experienced in Python, Java (mainly spigot), Javascript (node.js, basics of react.js), and Web Development. DM on discord me if you want a custom discord bot for your server (i'm bored).

Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...
  • 1 year later...
  • 4 weeks later...
Guest
This topic is now closed to further replies.
 Share



×
×
  • Create New...