Jump to content




Keep it day - A groundhog program



  • You cannot reply to this topic
20 replies to this topic

#1 FoxData

  • Members
  • 159 posts

Posted 09 March 2016 - 10:17 PM

Keep It day


Have you ever been working on something in creative mode just for it to turn to night? and you have to use that command?

Well this program will loop the time set command forever until terminated.*

Code:
Spoiler

Download:
Spoiler

Pastebin link: http://pastebin.com/zC7Kyu2H

Warning: This will spam your chat so turn it off before running the program

* Only compatible with command computers

Posted Image
This program is certified to work with O
WWO-114172892

Edited by FoxData, 11 March 2016 - 06:47 PM.


#2 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 09 March 2016 - 10:54 PM

Maybe put it to sleep for 2 mins in order to not overuse the server CPU.

#3 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 09 March 2016 - 11:46 PM

Indeed, this script will work, but it'll put a lot of stress on the server.

FWIW, I use this:

while true do
  commands.time("set 0")
  commands.weather("clear 600")
  sleep(600)
end

This sets the time to morning, then waits until dusk before repeating. It also disables all weather effects.

#4 MKlegoman357

  • Members
  • 1,170 posts
  • LocationKaunas, Lithuania

Posted 10 March 2016 - 07:57 AM

There's a /gamerule command made just for this thing.

#5 Dave-ee Jones

  • Members
  • 456 posts
  • LocationVan Diemen's Land

Posted 10 March 2016 - 09:15 AM

OR you could just type /gamerule doDaylightCycle false in chat which will use almost no CPU (like most other commands unless its one that spawns blocks or entities) and only needs to be set once per world. Seriously...I thought everyone knew this?

#6 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 11 March 2016 - 01:10 AM

Truth be told, I never searched for a gamerule to deal with the time - I only looked for one to stop the ********* rain and ***** snow, and could never find one.

#7 Dave-ee Jones

  • Members
  • 456 posts
  • LocationVan Diemen's Land

Posted 11 March 2016 - 10:52 AM

Well it says doDaylightCycle (do the cycle or not how clear can you get :P) and it was announced and everyone got hype about it cus they didn't have to use CPU chewing redstone clocks anymore. :)

#8 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 11 March 2016 - 11:03 AM

View PostAutoLocK, on 11 March 2016 - 10:52 AM, said:

Well it says doDaylightCycle (do the cycle or not how clear can you get :P) and it was announced and everyone got hype about it cus they didn't have to use CPU chewing redstone clocks anymore. :)
I use both doDaylightCycle and a daylight sensor: this way you can catch weather events (and so clear the weather).

#9 FoxData

  • Members
  • 159 posts

Posted 11 March 2016 - 06:48 PM

Tested It with O and it worked So now its got the O certification!

#10 Anavrins

  • Members
  • 775 posts

Posted 11 March 2016 - 07:09 PM

View PostFoxData, on 11 March 2016 - 06:48 PM, said:

Tested It with O and it worked So now its got the O certification!
What does that even mean?

#11 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 11 March 2016 - 08:52 PM

It would be weird if it did not work with O.

Edited by Creator, 11 March 2016 - 09:39 PM.


#12 FoxData

  • Members
  • 159 posts

Posted 11 March 2016 - 08:54 PM

View PostAnavrins, on 11 March 2016 - 07:09 PM, said:

View PostFoxData, on 11 March 2016 - 06:48 PM, said:

Tested It with O and it worked So now its got the O certification!
What does that even mean?

Means that it works with the OS called "O"

#13 Anavrins

  • Members
  • 775 posts

Posted 11 March 2016 - 11:08 PM

View PostFoxData, on 11 March 2016 - 08:54 PM, said:

Means that it works with the OS called "O"
The simplicity of your code is a such that it will work with pretty much everything without modification, so that's kind of meaningless.

#14 Dave-ee Jones

  • Members
  • 456 posts
  • LocationVan Diemen's Land

Posted 12 March 2016 - 12:24 AM

View PostAnavrins, on 11 March 2016 - 11:08 PM, said:

View PostFoxData, on 11 March 2016 - 08:54 PM, said:

Means that it works with the OS called "O"
The simplicity of your code is a such that it will work with pretty much everything without modification, so that's kind of meaningless.

Lol. A few lines will work in basically anything unless its a code that is programmed to overwrite the program that is running it, but seeing as it just resets the time of day every few seconds it shouldn't. I still think it's silly just to have a whole computer resetting the time of day when you can literally just set doDaylightCycle to false and BAM, no extra CPU usage required!

#15 FoxData

  • Members
  • 159 posts

Posted 12 March 2016 - 09:08 PM

Groundhog Version 2.00


Well The successor of "Keep it day" has turned up!

Introducing Groundhog 2.00

Download:
Spoiler

Code:
Spoiler


Pastebin link: http://pastebin.com/4UTcs7KD

Warning: This will spam your chat so turn it off before running the program

Edited by FoxData, 12 March 2016 - 09:13 PM.


#16 FoxData

  • Members
  • 159 posts

Posted 12 March 2016 - 09:14 PM

By march 13 this program will be no longer supported by FoxData.

A new version has been released: http://www.computerc...undhog-program/

#17 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 12 March 2016 - 09:18 PM

Threads merged.

#18 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 13 March 2016 - 12:29 AM

In your new program, you forgot the main loop.

Also, please don't act so pathetic. Works with O, well of course it does. Why should it not? And supporting a program for 3 days is the best idea ever. Seriously.

Also, we showed you some non CPU destroying methods. You could use them.

#19 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 13 March 2016 - 01:14 AM

View PostCreator, on 13 March 2016 - 12:29 AM, said:

In your new program, you forgot the main loop.

Not... exactly. The program now asks you to pick a function, and then spams it until termination. That much is likely intended.

It's indeed somewhat frustrating to see it ignore all suggestions made thus far, though.

#20 Anavrins

  • Members
  • 775 posts

Posted 13 March 2016 - 01:44 AM

View PostFoxData, on 12 March 2016 - 09:14 PM, said:

By march 13 this program will be no longer supported by FoxData.

A new version has been released: http://www.computerc...undhog-program/
You act like your program is something big, which it isn't, because people will prefer a less cpu-hogging method.
Statements like this are annoyingly redundant.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users