Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --TODO: add return to start
- 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 sideUp()
- select(3)
- turtle.place()
- turtle.up()
- select(4)
- turtle.place()
- turtle.up()
- turtle.place()
- turtle.up()
- select(3)
- turtle.place()
- turtle.up()
- select(2)
- turtle.place()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.place()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.up()
- select(3)
- turtle.place()
- turtle.up()
- end
- function sideDown()
- select(3)
- turtle.down()
- turtle.place()
- select(2)
- turtle.down()
- turtle.place()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.place()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- select(3)
- turtle.down()
- turtle.place()
- select(4)
- turtle.down()
- turtle.place()
- turtle.down()
- turtle.place()
- select(3)
- turtle.down()
- turtle.place()
- end
- function turnCorner()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- end
- function buildMid()
- turtle.back()
- turtle.back()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- select(1)
- for i = 1,6 do
- turtle.up()
- turtle.placeDown()
- end
- turtle.up()
- select(4)
- turtle.placeDown()
- select(6)
- turtle.placeDown()
- turtle.back()
- turtle.back()
- turtle.down()
- sideDown()
- turnCorner()
- sideUp()
- turnCorner()
- sideDown()
- turnCorner()
- sideUp()
- end
- function returnToStart()
- for i = 1,6 do
- turtle.down()
- end
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- end
- buildBase()
- buildMid()
- returnToStart()
Advertisement
Add Comment
Please, Sign In to add comment