Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local status = 0 -- 0 = Rechts -- 1 = Links --
- local slot = 1
- local stop = true
- function checkSlot()
- local run = true
- while run do
- local items = turtle.getItemCount(slot)
- if items == 0 then
- if slot == 16 and items == 0 then
- stop = false
- end
- slot = slot + 1
- else
- run = false
- end
- os.sleep(0.001)
- end
- end
- turtle.forward()
- while stop do
- checkSlot()
- if turtle.detect() == true then
- if status == 0 then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- status = 1
- elseif status == 1 then
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- status = 0
- end
- elseif turtle.detect() == false then
- turtle.placeDown()
- turtle.forward()
- end
- os.sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement