Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- ##################
- -- # Torches, Chest #
- -- ##################
- -- # Torches = 15 #
- -- # Chest = 14 #
- -- ##################
- print("Starting branch-program")
- print("Please place your turtle like this:")
- print(" # # # ")
- print(" # # # ")
- print(" # T # ")
- print("When ready, press start")
- local message = io.read()
- if ( message == "start" ) then
- print("How many rows?")
- message = io.read()
- rows = tonumber( message )
- end
- if ( rows ~= 0 ) then
- -- # Branches #
- for z=1, rows do
- -- # Dig this branch #
- for x=1, 40 do
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- end
- -- # Full inventory #
- if turtle.getItemCount( 14 ) > 0 then
- turtle.select(16)
- turtle.place()
- for i=1, 14 do
- turtle.select( i )
- turtle.drop()
- end
- turtle.dig()
- end
- -- # Return, placing torches #
- turtle.select(15)
- for i=1, rows do
- turtle.back()
- if i % 6 == 0 then
- turtle.place()
- end
- end
- -- # Starting a new row #
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment