Jump to content

computer craft lighting


ninga_fruit13
 Share

Recommended Posts

Basically what you need to do is get redstone to all of the specific lamps, I'd suggest RedStone lamps and use the RedWire connected to them since they can be placed more conveniently around the walls. After that you'll have to make a specific input call the Redstone to activate, which then activates the lamps. Here's a basic script you could use that I made myself some time ago:

1. Start the computer and type "edit startup" without the quoutes

2. Write this in the window:

print("Enable/disable lights?")

3. Now save the script (Press CTRL, save, then press CTRL and exit)

4. Now write "edit enable" without the quotes 

5. In there write this:  


rs.setOutput("bottom",true)  <--- Change "bottom" to where the redstone is connected to the computer! Examples: back, bottom, top, left, right

print("Turning on lights...")

sleep(2)

term.clear()

term.setCursorPos(1, 1)

print("Enable/disable lights?")


6. Save it as you did with the startup

7. Now write "edit disable" without the quotes

8. In the edit box write this:


rs.setOutput("bottom",false)  <--- Change "bottom" to where the redstone is connected to the computer! Examples: back, bottom, top, left, right

print("Turning off lights...")

sleep(2)

term.clear()

term.setCursorPos(1, 1)

print("Enable/disable lights?")

9. Save it and reboot the computer (Hold CTRL + R)

I think that should work, I did the same with mine and it works perfectly. Remember to follow the instructions carefully.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...