Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- length = tArgs[1] or 4
- width = tArgs[2] or 4
- height = tArgs[3] or 4
- term.clear()
- term.setCursorPos(1, 1)
- print("Generating cube...")
- print("Upon completion, terminate to stop.")
- function getItem()
- for h = 1, 16 do
- turtle.select(h)
- if turtle.getItemCount() > 0 then
- if h == 16 then
- error("no items")
- end
- break
- end
- end
- end
- while true do
- turtle.select(16)
- turtle.refuel();
- getItem()
- for l = 1, height do
- turtle.up()
- for n = 1, width/2 do
- turtle.placeDown()
- for i = 1, length-1 do
- turtle.forward()
- turtle.placeDown()
- end
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.placeDown();
- for i = 1, length-1 do
- turtle.forward()
- turtle.placeDown()
- end
- if n < width/2 then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- end
- --turtle.turnLeft()
- --turtle.turnLeft()
- --for i = 1, length-1 do
- -- turtle.forward()
- --end
- turtle.turnLeft()
- for i = 1, length-1 do
- turtle.forward()
- end
- turtle.turnLeft()
- end
- while not turtle.down() do end
- sleep(3)
- for v = 1, height-1 do
- turtle.down()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement