Posted 02 August 2012 - 10:34 AM
Hello to everyone i have made a programm to lock and unlock doors.
No i have a problem i have to enter all commands in a raw so if i enter o it wont work i have to enter s first how can i fix that
thx guys :ph34r:/>/>
No i have a problem i have to enter all commands in a raw so if i enter o it wont work i have to enter s first how can i fix that
thx guys :ph34r:/>/>
pass = ("31121997")
eins = ("back")
zwei = ("left")
drei = ("bottom")
vier = ("right")
print("enter password")
if io.read() == pass then
print("--------------------------------------------------")
print("MBLS-Military-Base-Lockdown-System-made by poezi")
print("sytem loaded! ready for task! ")
print("s= close all doors o= open all doors")
print("n= emergency lockdown")
print("1o = open central room")
print("1s = close central room")
print("2o = open batterieroom")
print("2s = close batterieroom ")
print("3o = open rooms")
print("3s = close rooms")
print("4o = open maindoor")
print("4s = close maindoor")
print("--------------------------------------------------")
if io.read() == ("s") then
redstone.setOutput(eins , true)
redstone.setOutput(zwei , true)
redstone.setOutput(drei , true)
redstone.setOutput(vier , true)
write("Alle Schotten dicht")
end
if io.read() == ("o") then
redstone.setOutput(eins , false)
redstone.setOutput(zwei , false)
redstone.setOutput(drei , false)
redstone.setOutput(vier , false)
write("Alle Schotten offen")
end
if io.read() == ("n") then
redstone.setOutput(eins , true)
redstone.setOutput(zwei , true)
redstone.setOutput(drei , true)
redstone.setOutput(vier , true)
write("Alles abgeriegel Alarm ausgloest")
redstone.setOutput("top" , true)
sleep(10)
end
if io.read() == ("1o") then
redstone.setOutput(eins, false)
write("central door open")
end
if io.read() == ("1s") then
redstone.setOutput(eins, true)
write("central door clooser")
end
if io.read() == ("2o") then
redstone.setOutput(zwei, false)
write("batterie room open")
end
if io.read() == ("2s") then
redstone.setOutput(zwei, true)
write("batterie room closed")
end
if io.read() == ("3o") then
redstone.setOutput(drei, false)
write("rooms open")
end
if io.read() == ("3s") then
redstone.setOutput(drei, true)
write("rooms closed")
end
if io.read() == ("4o") then
redstone.setOutput(vier, false)
write("maindoor open")
end
if io.read() == ("4s") then
redstone.setOutput(vier, true)
write("maindoor closed")
end
end