Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local bpFile = fs.open(shell.resolve(args[1]))
- local blueprint = textutils.deserialize(bpFile.readAll())
- print("Please put materials in the following slots:")
- for i=1,#blueprint.slots do
- print(i..". "..blueprint.slots[i].name..": "..blueprint.slots[i].count)
- end
- print("Press enter to start...")
- read()
- local i = 1
- local right = true
- for h=1,blueprint.h do
- turtle.up()
- for y=1,blueprint.y do
- for x=1,blueprint.x do
- if(blueprint.tcode[i] > 0) then
- turtle.select(blueprint.tcode[i])
- turtle.placeDown()
- end
- if x < blueprint.x then
- turtle.forward()
- end
- i = i + 1
- end
- if y < blueprint.y then
- if right then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- right = false
- else
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- right = true
- end
- end
- end
- turtle.turnRight()
- turtle.turnRight()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement