Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --TODO: return to start is not same as others
- tArgs = {...}
- color = tArgs[1]
- function select(i)
- turtle.select(i+ (color == "white" and 0 or 6))
- end
- function buildBase()
- select(1)
- for y = 1,5 do
- for x = 1,4 do
- turtle.placeDown()
- turtle.forward()
- end
- if y < 5 then
- if y%2 ~= 0 then
- turtle.turnRight()
- turtle.placeDown()
- turtle.forward()
- turtle.turnRight()
- else
- turtle.turnLeft()
- turtle.placeDown()
- turtle.forward()
- turtle.turnLeft()
- end
- end
- end
- turtle.placeDown()
- end
- function buildMid()
- turtle.back()
- turtle.turnLeft()
- turtle.forward()
- for i = 1,4 do
- turtle.up()
- turtle.placeDown()
- end
- turtle.forward()
- turtle.forward()
- turtle.down()
- for i = 1,3 do
- turtle.down()
- turtle.placeUp()
- end
- turtle.turnRight()
- turtle.back()
- turtle.place()
- turtle.back()
- for i = 1,4 do
- turtle.up()
- turtle.placeDown()
- end
- turtle.turnLeft()
- turtle.back()
- turtle.back()
- turtle.down()
- for i = 1,3 do
- turtle.down()
- turtle.placeUp()
- end
- turtle.turnLeft()
- turtle.back()
- turtle.place()
- turtle.turnLeft()
- turtle.back()
- for i = 1,4 do
- turtle.up()
- turtle.placeDown()
- end
- end
- function turnCorner()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- end
- function addCovers()
- select(3)
- turtle.back()
- turtle.back()
- for i = 1,4 do
- turtle.down()
- turtle.place()
- end
- turnCorner()
- for i = 1,4 do
- turtle.place()
- turtle.up()
- end
- turnCorner()
- for i = 1,4 do
- turtle.down()
- turtle.place()
- end
- turnCorner()
- for i = 1,4 do
- turtle.place()
- turtle.up()
- end
- end
- function buildTop()
- select(2)
- turtle.up()
- turtle.turnLeft()
- turtle.placeDown()
- turtle.forward()
- turtle.placeDown()
- turtle.forward()
- turtle.placeDown()
- for j = 1,3 do
- turtle.turnRight()
- for i = 1,4 do
- turtle.forward()
- turtle.placeDown()
- end
- end
- turtle.turnRight()
- turtle.forward()
- turtle.placeDown()
- turtle.turnRight()
- turtle.forward()
- select(3)
- for y = 1,3 do
- for x = 1,2 do
- turtle.placeDown()
- turtle.forward()
- end
- if y < 3 then
- if y%2 == 0 then
- turtle.turnRight()
- turtle.placeDown()
- turtle.forward()
- turtle.turnRight()
- else
- turtle.turnLeft()
- turtle.placeDown()
- turtle.forward()
- turtle.turnLeft()
- end
- end
- end
- turtle.placeDown()
- select(2)
- turtle.forward()
- turtle.turnRight()
- turtle.back()
- turtle.up()
- for i = 1,4 do
- turtle.placeDown()
- turtle.forward()
- turtle.forward()
- turtle.placeDown()
- turtle.forward()
- turtle.forward()
- turtle.placeDown()
- turtle.turnRight()
- end
- end
- function returnToStart()
- for i = 1,4 do
- turtle.forward()
- end
- turtle.turnRight()
- turtle.back()
- for i = 1,6 do
- turtle.down()
- end
- turtle.forward()
- end
- buildBase()
- buildMid()
- addCovers()
- buildTop()
- returnToStart()
Advertisement
Add Comment
Please, Sign In to add comment