Posted 17 July 2015 - 04:14 AM
So, I'm doing this program to craft processor automatically, but the program works properly till the part where it asks you which processor you want, I did just the calculation one atm, but when I answer "calculation" or "calc" (tried changing the answer) the program stops, simply stops.
or a link: http://pastebin.com/nxXDftTR
What the program does is: it uses the items in the turtle's inventory, to "drop" in the right places of the inscriber and craft the processors.
write("Put presses in slots 13 to 16 (all 4 bottom ones) in order:Silicon;Calculation;Logic;Engineering")
sleep(10)
write("Done? ")
local dn = ( read() )
if dn == "yes" then
write("Wich processor? ")
local prc = ( read() )
elseif prc == "calc" then
write("How many? ")
local qtd = ( read() )
write("Put "..qtd.." silicon in slot 1, "..qtd.." pure certus quartz in slot 2, and "..qtd.." redstone in slot 3")
write("Ready? ")
local rdy = ( read() )
elseif rdy == "yes" then
turtle.select(13)
turtle.up()
turtle.forward()
turtle.dropDown()
turtle.back()
turtle.down()
turtle.select(1)
for i=1,qdt do
turtle.select(1)
turtle.drop()
sleep(15)
turtle.select(5)
turtle.suck()
end
turtle.up()
turtle.forward()
turtle.select(13)
turtle.suckDown()
turtle.select(14)
turtle.dropDown()
turtle.back()
turtle.down()
for i=1,qtd do
turtle.select(2)
turtle.drop()
sleep(15)
turtle.select(6)
turtle.suck()
end
turtle.up()
turtle.forward()
turtle.select(14)
turtle.suckDown()
for i=1,qtd do
turtle.select(5)
turtle.back()
turtle.down()
turtle.select(3)
turtle.drop()
turtle.down()
turtle.forward()
turtle.select(6)
turtle.dropUp()
turtle.back()
turtle.up()
sleep(15)
turtle.select(7)
turtle.suck()
turtle.up()
turtle.forward()
end
else
sleep(5)
end
or a link: http://pastebin.com/nxXDftTR
What the program does is: it uses the items in the turtle's inventory, to "drop" in the right places of the inscriber and craft the processors.