Posted 02 April 2014 - 07:52 AM
so here's my lock code, I've kinda thrown bits and chunks of it together from other codes and my very basic knowledge of lua… but could someone assist me with redirecting what's written on the monitor through a modem cable, thank the monitor is also name 'monitor_0' when it's connected to the cable. the monitor is 3x1 blocks if this helps at all? thank you!
os.pullEvent = os.pullEventRaw
while true do
term.clear()
term.setCursorPos(1,1)
print ("Zared's Security System Initialized")
local monitor = peripheral.wrap("monitor_0")
monitor.write("Zared's Vault Lock V2.6.11")
write("Password: ")
local input = read("*")
if input == "Synapse" then
term.clear()
term.setCursorPos(1,1)
print ("correct! See monitor for details")
local monitor = peripheral.wrap("monitor_0")
term.redirect( monitor)
print("Password Correct...")
sleep(3)
print("Establishing uplink to Partical Matrix.")
sleep(3)
print("Uplink established!")
print("Threading code.")
sleep(3)
print("Setting Forcetron Partical Matrix State to: 'False'")
sleep(3)
print("Injection complete!")
print("Disabling particles: True")
sleep(2)
term.clear()
term.setCursorPos(1,1)
term.restore()
rs.setOutput("left",true)
sleep(6)
rs.setOutput("left",false)
term.clear()
term.setCursorPos(1,1)
else
print("Password Incorrect!")
sleep(2)
term.clear()
term.setCursorPos(1,1)
term.restore()
sleep(2)
term.clear()
term.setCursorPos(1,1)
end
end
Edited on 03 April 2014 - 12:16 AM