Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = { ... }
- if #tArgs ~= 1 then
- error( "Usage: rectangle <length> <width>" )
- return
- end
- length = tArgs[1]
- width = tArgs[2]
- slot = 1
- turtle.select(slot)
- turtle.forward()
- for i=1,width do
- for j=1,length do
- turtle.placeDown()
- turtle.forward()
- if turtle.getItemCount(slot) == 0 then
- slot = slot + 1
- turtle.select(slot)
- end
- end
- for k=1,length do
- turtle.back()
- end
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement