Sun Reset

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

SebyHas

New Member
Mar 30, 2018
9
0
1
123
Hi, i have a little problem with my script, the script need to:
At server time 17:00 to start a sun reset animation, when the sun every (custom delay) 4 ticks turn 30 minecraft minutes back, and when the sun arrive at 07:00 position, script need stop.
But, my scritp at 17:00 set time to 17:00 every 1 tick ("while" delay, i presume), the sun remain in the same position, and the test part of script spam in chat only 17:00.
Server Version: CraftBukkit version git-PaperSpigot-"4c7641d" (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)
Skript Version: 2.1.2
SkQuery Version: 3.21.4

Code:
Options:
    Delay: 4 tick

at 17:00:
    set {_sunreset} to 17:00
    while {_sunreset} > 07:00:
        remove 30 minutes from {_sunreset}
        set time to {_sunreset}
        wait {@Delay}
        loop all players: # This is only for test the script.
            send "%time%" to loop-player
[doublepost=1601228579,1600971092][/doublepost]Please.
 
Code:
at 17:00:
    execute console command "/gamerule doDaylightCycle false"
    wait 4 ticks
    set time to 16:30
    wait 4 ticks
    set time to 16:00
    wait 4 ticks
    set time to 15:30
    wait 4 ticks
    set time to 15:00
    wait 4 ticks
    set time to 14:30
    wait 4 ticks
    set time to 14:00
    wait 4 ticks
    set time to 13:30
    wait 4 ticks
    set time to 13:00
    wait 4 ticks
    set time to 12:30
    wait 4 ticks
    set time to 12:00
    wait 4 ticks
    set time to 11:30
    wait 4 ticks
    set time to 11:00
    wait 4 ticks
    set time to 10:30
    wait 4 ticks
    set time to 10:00
    wait 4 ticks
    set time to 9:30
    wait 4 ticks
    set time to 9:00
    wait 4 ticks
    set time to 8:30
    wait 4 ticks
    set time to 8:00
    wait 4 ticks
    set time to 7:30
    wait 4 ticks
    set time to 7:00
    execute console command "/gamerule doDaylightCycle true"
    stop
 
Code:
My first version contain "wait 4 ticks
    set time to 16:30"
But i tryed to replace with a variable, for make the script much little.
Gamerule command need?
Change someting?
Thank you for your risponse!
cbDCWsx.png

[doublepost=1601540193,1601274509][/doublepost]Someone can help me, please! :emoji_grinning:
[doublepost=1602169387][/doublepost]I nee some help,someone can help me, please?!
 
Code:
My first version contain "wait 4 ticks
    set time to 16:30"
But i tryed to replace with a variable, for make the script much little.
Gamerule command need?
Change someting?
Thank you for your risponse!
cbDCWsx.png

[doublepost=1601540193,1601274509][/doublepost]Someone can help me, please! :emoji_grinning:
[doublepost=1602169387][/doublepost]I nee some help,someone can help me, please?!

any errors?
 
Status
Not open for further replies.