Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- local length = tonumber(tArgs[1]) or 0
- local width = tonumber(tArgs[2]) or 0
- local slot = 1
- function doWork()
- for i = 1, width, 1 do
- for j = 1, length, 1 do
- turtle.digUp()
- place("up")
- if j < length then
- turtle.forward()
- end
- end
- if ( i % 2 == 0 ) then
- turtle.turnRight()
- else
- turtle.turnLeft()
- end
- turtle.forward()
- if ( i % 2 == 0 ) then
- turtle.turnRight()
- else
- turtle.turnLeft()
- end
- end
- end
- function place(dir)
- if turtle.getItemCount(slot) == 1 then
- if slot == 16 then
- print("Put more blocks")
- while turtle.getItemCount(slot) == 1 do
- sleep(1)
- end
- slot = 1
- else
- slot = slot + 1
- end
- turtle.select(slot)
- place(dir)
- end
- if dir == "up" then
- turtle.placeUp()
- elseif dir == "down" then
- turtle.placeDown()
- else
- turtle.place()
- end
- end
- doWork()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement