Posted 08 December 2012 - 09:02 AM
Hello! This is my first topic so I hope everyone likes it :)/>
This is a very simple program that gets the time with os.time(), checks if it is 6:00 PM (ingame time) and it resets it with a Command block (/time set 0) It also prints out if it changes or still not and the current time.
The code:
The Pastebin: http://pastebin.com/Lmy1x8VJ
To get it directly from pastebin do ingame:
How to use it:
1. Use the pastebin command in the computer o simply copy it to a new program
2. Place a Command Block where you want next to the compute
3. In the Command Block put the command: /time set 0
4. Enter the code and change the position of the output side of redstone and the time (optional)
5. Enjoy the sun
Thank you! :D/>
This is a very simple program that gets the time with os.time(), checks if it is 6:00 PM (ingame time) and it resets it with a Command block (/time set 0) It also prints out if it changes or still not and the current time.
The code:
while true do
term.clear()
term.setCursorPos(1,1)
time = textutils.formatTime(os.time(), false)
if time == "6:00 PM" then
print("Now")
rs.setOutput("left", true)
sleep(1)
rs.setOutput("left", false)
else
print("Not yet")
end
print(time)
sleep(1)
end
The Pastebin: http://pastebin.com/Lmy1x8VJ
To get it directly from pastebin do ingame:
pastebin get Lmy1x8VJ timecontrol
How to use it:
1. Use the pastebin command in the computer o simply copy it to a new program
2. Place a Command Block where you want next to the compute
3. In the Command Block put the command: /time set 0
4. Enter the code and change the position of the output side of redstone and the time (optional)
5. Enjoy the sun
Thank you! :D/>