Advertisement
SolWarriorDjango

ComputerCraft Clock

Mar 24th, 2014
6,107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.88 KB | None | 0 0
  1. --[ Code written by SolWarriorDjango ]--
  2. --[ A Simple message board clock for the ComputerCraft Minecraft mod ]--
  3. --[ monitor.setTextColor(?) is only available for advanced computers and advanced monitors ]--
  4.  
  5. --[ side -> Replace with the side that the monitor is touching ]--
  6. --[ ? -> Replace with a numerical value ]--
  7.  
  8. --[ Variables ]--
  9. monitor = peripheral.wrap("side")
  10.  
  11. --[ Clock ]--
  12. while true do
  13. term.redirect(monitor)              --[ Tells the computer to display everything on the adjacent monitor ]--
  14.     monitor.clear()                 --[ Clears the monitor ]--
  15.     monitor.setTextScale(?)         --[ Sets the size of the text ]--
  16.     monitor.setTextcolor(?)         --[ Sets the text color ]--
  17.         term.setCursorPos(?,?)      --[ Sets the position of the text on adjacent monitor ]--
  18.             shell.run("time")       --[ Access the running Minecraft world clock ]--
  19.     sleep(1)                        --[ Do nothing for 1 second ]--
  20. term.restore()
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement