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

khelpire

Member
Feb 22, 2021
4
1
3
25
Hello I am planning to reset the resource world on my server using skript and I want the resource world to have the same time as all my other worlds or let's say specific world, but I don't know what is the correct code for check_time?

Here is my code so far

every 72000 ticks:
make console execute "resourceworld reset"
make console execute "time set {spawn_world_time} resourceworld"

and also if possible, for all the other worlds that I have like the wilderness world I want them to have the same time with our spawn.
[doublepost=1614319014,1614174891][/doublepost]Hello can anyone help me find the code for check time in docs? I mean I am really new to skript or to coding so what category does check_specific_world_time belongs? Events, Conditions, etc...
[doublepost=1614319082][/doublepost]Update:
Okay I just found it on Documenations, the placeholder is %time% may I ask on how to make a variable that connects with %time%?
like variable time = %time%
 
Hello I am planning to reset the resource world on my server using skript and I want the resource world to have the same time as all my other worlds or let's say specific world, but I don't know what is the correct code for check_time?

Here is my code so far

every 72000 ticks:
make console execute "resourceworld reset"
make console execute "time set {spawn_world_time} resourceworld"

and also if possible, for all the other worlds that I have like the wilderness world I want them to have the same time with our spawn.
[doublepost=1614319014,1614174891][/doublepost]Hello can anyone help me find the code for check time in docs? I mean I am really new to skript or to coding so what category does check_specific_world_time belongs? Events, Conditions, etc...
[doublepost=1614319082][/doublepost]Update:
Okay I just found it on Documenations, the placeholder is %time% may I ask on how to make a variable that connects with %time%?
like variable time = %time%

If you want to set the same time to all worlds do this:
code_language.skript:
command /timeworlds:
    permission: timeworlds.admin
    trigger:
        loop all worlds:
            set loop-world's time to 6:00 #Day
If you want to check the worlds time use this:
code_language.skript:
if world's time is %time%:

For example
code_language.skript:
command /checktime:
    trigger:
        if world's time is between 6:00 and 19:29:
            send "&aWorld's time is day!"
        else:
            send "&aWorld's time is night!"
Also, "world's time" will show you the world's time of the player that ran that command.
 
Hello, thank you so much for this! I have read the code and I just realize to myself that I kept on using the console command and not on skript events or such. Thank you! I have learned new codes or knowledge from skript. Will be checking more about skript in the Docs. Btw, this is the event or command that I really want to have on my server to let all worlds have the same time.
 
  • Like
Reactions: couger44
Hello, thank you so much for this! I have read the code and I just realize to myself that I kept on using the console command and not on skript events or such. Thank you! I have learned new codes or knowledge from skript. Will be checking more about skript in the Docs. Btw, this is the event or command that I really want to have on my server to let all worlds have the same time.
You're welcome.
 
Status
Not open for further replies.