Posted 29 January 2013 - 06:15 AM
hello the title is all :D/>
but i have here sme code, because i will that when redstone input comes that a while will end but it´s not working, and sorry for bad english
while true do
x = redstone.setBundledOutput("right", colors.blue)
local x = false
while x == false do
term.clear()
local w, h = term.getSize()
for i=0, w, 1 do
term.setCursorPos(1+i,1)
print("#")
end
for i=0, w, 1 do
term.setCursorPos(1+i,h)
print("#")
end
for i=0, h, 1 do
term.setCursorPos(1,1+i)
print("#")
end
for i=0, h, 1 do
term.setCursorPos(w,1+i)
print("#")
end
term.setCursorPos(2,2)
print("Waehlen sie bitte ein Option:")
term.setCursorPos(3,3)
print("<U> Fahrstuhl hochfahren")
term.setCursorPos(3,4)
print("<D> Fahrstuhl runterfahren")
term.setCursorPos(3,6)
local eingabe = read()
if (eingabe == "U" or eingabe == "u" and redstone.testBundledInput("right", colors.white+colors.orange)) == true then
for i=0,13 do
redstone.setBundledOutput("right", colors.green)
sleep(0.5)
redstone.setBundledOutput("right", 0)
sleep(0.5)
end
end
if (eingabe == "D" or eingabe == "d" and redstone.testBundledInput("right", colors.white+colors.orange)) == true then
for i=0,13 do
redstone.setBundledOutput("right", colors.brown)
sleep(0.5)
redstone.setBundledOutput("right", 0)
sleep(0.5)
end
else
os.reboot()
end
end
end
please helpt me and it must a bundled cable input with color blue
but i have here sme code, because i will that when redstone input comes that a while will end but it´s not working, and sorry for bad english
while true do
x = redstone.setBundledOutput("right", colors.blue)
local x = false
while x == false do
term.clear()
local w, h = term.getSize()
for i=0, w, 1 do
term.setCursorPos(1+i,1)
print("#")
end
for i=0, w, 1 do
term.setCursorPos(1+i,h)
print("#")
end
for i=0, h, 1 do
term.setCursorPos(1,1+i)
print("#")
end
for i=0, h, 1 do
term.setCursorPos(w,1+i)
print("#")
end
term.setCursorPos(2,2)
print("Waehlen sie bitte ein Option:")
term.setCursorPos(3,3)
print("<U> Fahrstuhl hochfahren")
term.setCursorPos(3,4)
print("<D> Fahrstuhl runterfahren")
term.setCursorPos(3,6)
local eingabe = read()
if (eingabe == "U" or eingabe == "u" and redstone.testBundledInput("right", colors.white+colors.orange)) == true then
for i=0,13 do
redstone.setBundledOutput("right", colors.green)
sleep(0.5)
redstone.setBundledOutput("right", 0)
sleep(0.5)
end
end
if (eingabe == "D" or eingabe == "d" and redstone.testBundledInput("right", colors.white+colors.orange)) == true then
for i=0,13 do
redstone.setBundledOutput("right", colors.brown)
sleep(0.5)
redstone.setBundledOutput("right", 0)
sleep(0.5)
end
else
os.reboot()
end
end
end
please helpt me and it must a bundled cable input with color blue