Formatting %now%

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

ICoding_

New Member
May 11, 2018
9
0
0
23
Hello

I am trying to recreate Hypixel Skyblock with skript and I need to know how I can reformat the normal %now% format to have / instead of -, and it would also help if anyone told me how I can get the date and time separately.

Here is my code:

Code:
every 1 second:
    loop all players:
        wipe loop-player's sidebar
        set name of sidebar of loop-player to "&e&lSKYBLOCK"
        set score "&7%date% &8M27E" in sidebar of loop-player to 9
        set score "&b" in sidebar of loop-player to 8
        set score "&f Late Spring 13th" in sidebar of loop-player to 7
        set score "&7 %now%" in sidebar of loop-player to 6
        set score "&7 thing &blocation" in sidebar of loop-player to 5
        set score "&8" in sidebar of loop-player to 4
        set score "&fPurse: &6%balance of loop-player%" in sidebar of loop-player to 3
        set score "&7" in sidebar of loop-player to 2
        set score "&ewww.hypixel.net" in sidebar of loop-player to 1

And also, I tried using %date% but that didn't work.

Here are also my plugins:
Skript, Vault, Skellete, skRayFall, SkQuery, Essentials, EssentialsSpawn and EssentialsChat

I don't know if that helped but there you go.
 
Hello

I am trying to recreate Hypixel Skyblock with skript and I need to know how I can reformat the normal %now% format to have / instead of -, and it would also help if anyone told me how I can get the date and time separately.

Here is my code:

Code:
every 1 second:
    loop all players:
        wipe loop-player's sidebar
        set name of sidebar of loop-player to "&e&lSKYBLOCK"
        set score "&7%date% &8M27E" in sidebar of loop-player to 9
        set score "&b" in sidebar of loop-player to 8
        set score "&f Late Spring 13th" in sidebar of loop-player to 7
        set score "&7 %now%" in sidebar of loop-player to 6
        set score "&7 thing &blocation" in sidebar of loop-player to 5
        set score "&8" in sidebar of loop-player to 4
        set score "&fPurse: &6%balance of loop-player%" in sidebar of loop-player to 3
        set score "&7" in sidebar of loop-player to 2
        set score "&ewww.hypixel.net" in sidebar of loop-player to 1

And also, I tried using %date% but that didn't work.

Here are also my plugins:
Skript, Vault, Skellete, skRayFall, SkQuery, Essentials, EssentialsSpawn and EssentialsChat

I don't know if that helped but there you go.


code_language.skript:
command /timetest:
    trigger:
        set {_time} to now formatted as "HH:mm"
        set {_date} to now formatted as "yyyy/MM/dd"
        send "%{_time}%"
        send "%{_date}%"
 
Status
Not open for further replies.