Posted 07 June 2012 - 11:49 PM
so I was trying to make a computercraft controller for direwolf20 quarry, here is the code:
cycle = "cycle"
print("quarry 1.0.0")
print("please put a command")
input = read()
if input == cycle then
write("How many times should I loop? ")
local Num = tostring( read() )
for i=1,Num do
print("Looped "..tostring(i).." time(s).")
rs.setBundledOutput("back" , colors.magenta)
sleep(1.0)
rs.setbundledOutput("back" , colors.yellow)
sleep(1.0)
end
end
What it should do is to first display quarry 1.0.0 and please put a command, then we need to type cycle, then that how many times should I loop appear, then we should type a number, then the magenta wire and yellow color will blink alternately.
cycle = "cycle"
print("quarry 1.0.0")
print("please put a command")
input = read()
if input == cycle then
write("How many times should I loop? ")
local Num = tostring( read() )
for i=1,Num do
print("Looped "..tostring(i).." time(s).")
rs.setBundledOutput("back" , colors.magenta)
sleep(1.0)
rs.setbundledOutput("back" , colors.yellow)
sleep(1.0)
end
end
What it should do is to first display quarry 1.0.0 and please put a command, then we need to type cycle, then that how many times should I loop appear, then we should type a number, then the magenta wire and yellow color will blink alternately.