Time add doesn't really work.

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

arther

Member
Feb 15, 2018
1
0
1
26
Hello, wonderful people of the SkUnity Community. I recently started to enter the "Skript-Flow" which lead me to make several creations that make me absolutely happy!

Today I wanted to create a command that sets the world time fluidly instead of an instant time change. I'm sorry that some things are written in German.

In Vanilla Minecraft you would use the command /time add <Value> but I don't want to let the trigger execute a console command. Sadly every sun and moon movements stop and the moon goes through all its phases instead of adding 1 to the world time. After the 100 loops, everything will stop and an error message will be sent.

I really hope that someone of you is able to correct or help me! Thank you.

code_language.skript:
command /tag:
    trigger:
        player has permission "carolus.player.time.day"
        if {carolus.event.world.zeit.set} is true:
            show action bar from "&7&o&lDie Zeit wird bereits beeinflusst" to the player
            stop
        if {carolus.event.world.zeit.set} is false:
            broadcast "&7&o&lDie Tageszeit wird von %player% beeinflusst.."
            set {_t} to time
            set {carolus.event.world.zeit.set} to true
            NoteSoundWait(player)
            loop 100 times:
                add 1 minute to {_t}
                wait a tick
                set time to {_t}
                if time is 12:00:
                    NoteSoundSuccess(player)
                    stop loop
                    stop
            NoteSoundWait(player)
            set {carolus.event.world.zeit.set} to false
            show action bar from "&7&o&lFehler" to player
 
Status
Not open for further replies.