231 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
-- Keep It day
-- By FoxData
term.clear()
-- fs.copy(“Keepitday”, “disk/startup”) – This feature is not fully implemented yet
while true do
commands.exec(“time set day”)
print(“Time Set Day”)
end
Download:
Spoiler
pastebin get zC7Kyu2HPastebin link:
http://pastebin.com/zC7Kyu2HWarning: This will spam your chat so turn it off before running the program* Only compatible with command computers
This program is certified to work with O
WWO-114172892
Edited on 11 March 2016 - 05:47 PM
2679 posts
Location
You 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.
7083 posts
Location
Tasmania (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.
1140 posts
Location
Kaunas, Lithuania
Posted 10 March 2016 - 07:57 AM
There's a /gamerule command made just for this thing.
467 posts
Location
Van 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?
7083 posts
Location
Tasmania (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.
467 posts
Location
Van 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. :)/>
1426 posts
Location
Does anyone put something serious here?
Posted 11 March 2016 - 11:03 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. :)/>
I use both doDaylightCycle and a daylight sensor: this way you can catch weather events (and so clear the weather).
231 posts
Posted 11 March 2016 - 06:48 PM
Tested It with O and it worked So now its got the O certification!
756 posts
Posted 11 March 2016 - 07:09 PM
Tested It with O and it worked So now its got the O certification!
What does that even mean?
2679 posts
Location
You will never find me, muhahahahahaha
Posted 11 March 2016 - 08:52 PM
It would be weird if it did not work with O.
Edited on 11 March 2016 - 08:39 PM
231 posts
Posted 11 March 2016 - 08:54 PM
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"
756 posts
Posted 11 March 2016 - 11:08 PM
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.
467 posts
Location
Van Diemen's Land
Posted 12 March 2016 - 12:24 AM
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!
231 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.00Download:
Spoiler
pastebin get 4UTcs7KDCode:
Spoiler
-- Groundhog --
-- By FoxData --
-- Version 2.00 --
term.clear()
print("Welcome to groundhog V2.00")
term.setCursorPos(1,2)
print("T: No More night")
term.setCursorPos(1,3)
print("W: No More rain")
local event, key = os.pullEvent( "key" )
if key == keys.t then
while true do
commands.exec("time set day")
end
end
if key == keys.w then
while true do
commands.exec("weather clear")
end
end
Pastebin link:
http://pastebin.com/4UTcs7KDWarning: This will spam your chat so turn it off before running the program
Edited on 12 March 2016 - 08:13 PM
231 posts
Posted 12 March 2016 - 09:14 PM
8543 posts
Posted 12 March 2016 - 09:18 PM
Threads merged.
2679 posts
Location
You 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.
7083 posts
Location
Tasmania (AU)
Posted 13 March 2016 - 01:14 AM
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.
756 posts
Posted 13 March 2016 - 01:44 AM
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.
767 posts
Posted 13 March 2016 - 01:45 AM
It's indeed somewhat frustrating to see it ignore all suggestions made thus far, though.
I have to agree on this point.
Comments are here to add the missing '
constructive critism' to the topics.
Ignoring comments it pretty much the same as ignoring to admit something that
could be done in a better, less harming way. (By harming i mean
non-CPU friendly)