Solved At time event?

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

Noblesuntzu

Active Member
Feb 18, 2017
63
4
8
32
Okay quick question is there an addon with an event something like "at time 12:00PM EST?" I know there is an at minecraft time event but I need something that happens once a day, without having to worry about restarting the server and resetting the periodical track. Anyway thanks!
 
I came up with the following solution which isn't perfect but it suits my needs.

code_language.skript:
on command /timer <integer>:
  usage: /timer <time in minutes til cooldown reset>
  permission: timer.set
  trigger:
    set {time.left} to <integer>
every minute:
  remove 1 from {time.left}
[The reason I provided a timer command with a variable is so you could subtract the minutes of the current time from the minutes of the target time]
(I provided my code in case someone else had the same issue.)

Obviously this is slightly flawed because when the server restarts the timer will get offset by a few minutes but I'm not super worried about it.

A possible solution to this would be the %now% expression but I'm completely lost when it comes to parsing that so I won't lol.

Anyway I'm going to mark this reply as correct but thank you for your suggestion TPgamesNL it's actually what prompted this solution haha.
 
i cant remember how I did it in the past with my restart skript but it was something like this
code_language.skript:
everyone 1 minute:
    if now is 12:00pm:
        #do something
it was something along these lines.
 
  • Like
Reactions: TPGamesNL
i cant remember how I did it in the past with my restart skript but it was something like this
code_language.skript:
everyone 1 minute:
    if now is 12:00pm:
        #do something
it was something along these lines.
Oh that's simple enough haha thank you!
 
Oh that's simple enough haha thank you!
You're welcome, im not 100% sure if that's how its done, but it was SOMETHING like that, Ill see if i can find my old scripts
[doublepost=1543621680,1543621427][/doublepost]Luckily discord saves everything
Use this for reference or use it however you like
 

Attachments

  • restart.sk
    1.8 KB · Views: 858
Status
Not open for further replies.