Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local select_slot = 0
- local ender_chest_slot = 1
- local forward_motion = 0
- local left_motion = 0
- local left_right = "right"
- term.write("Insert Length: ")
- Length = tonumber(read()) - 1
- print(" ")
- term.write("Insert Width: ")
- Width = tonumber(read())
- print(" ")
- local Length = Length
- local Width = Width
- function strip()
- if left_motion % 2 == 0 then
- while forward_motion ~= Length do
- selectSlot()
- turtle.placeDown()
- turtle.forward()
- forward_motion = forward_motion + 1
- end
- else
- while forward_motion ~= 0 do
- selectSlot()
- turtle.placeDown()
- turtle.forward()
- forward_motion = forward_motion - 1
- end
- end
- end
- function turn()
- if left_motion % 2 == 0 then
- turtle.turnRight()
- turtle.placeDown()
- turtle.forward()
- left_motion = left_motion + 1
- turtle.turnRight()
- else
- turtle.turnLeft()
- turtle.placeDown()
- turtle.forward()
- left_motion = left_motion + 1
- turtle.turnLeft()
- end
- end
- function selectSlot()
- for q=1,16 do
- local item_detail = turtle.getItemDetail(q)
- if item_detail then
- select_slot = q
- break
- end
- end
- turtle.select(select_slot)
- end
- print("STARTING")
- while left_motion ~= Width do
- strip()
- turn()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement