Fandom

The Tekkit Wiki

Tutorial/Simple Clock

< Tutorial

874pages on
this wiki
Add New Page
Talk0 Share

This tutorial will teach you how to setup a simple Clock for your computer.

For this version you'll need a Disk Drive at the left side (with Floppy Disk) & a Monitor on the right. (Tip: Creating this program on the Disk, will make the shutdown of the program easier.)

Start by editing the file "disk/clock" (from your Computer [cd /]):

-- Simple Clock
-- Written by Galxis
-- Posted to The Tekkit Wiki on 11/04/2012
while true do
 if disk.isPresent("left") then
   shell.run("monitor", "right", "time")
   sleep(5)
 end
term.clear()
shell.run("monitor", "right", "clear")     <---- Otherwise the Monitor gets flooded!
term.setCursorPos(1, 1)
end


But if you would like to create it with a Redstone Input on the Back:

-- Simple Clock
-- Written by Galxis
-- Posted to The Tekkit Wiki on 11/04/2012
while true do
 if redstone.getInput("back") then
   shell.run("monitor", "right", "time")
   sleep(5)
 end
term.clear()
shell.run("monitor", "right", "clear")     <--- Same as above!
term.setCursorPos(1, 1)
end
  • The Coding
  • The Command :)

As of the latest update for Tekkit, the command "time" can be inputted into a computer, which will reveal the time.

Start a Discussion Discussions about Tutorial/Simple Clock

  • How do I edit disk/clock?

    3 messages
    • Type "edit disk" in the terminal and it should take you to a black screen where you may begin writing.
    • insted of sleep(5), sleep(1) makes it update more and shows u a more current time
  • tekkit

    5 messages
    • Um why exactly does it need the code about the disk? That seems frivolous.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.