Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("welcome")
- print("place stopper block in slot 1")
- print("place stopper block2 in slot 2")
- function fuel()
- if turtle.getFuelLevel() < 100 then
- turtle.select(9)
- turtle.suckUp()
- turtle.refuel()
- empty = turtle.getItemCount(9)
- if empty > 0 then
- turtle.dropUp(empty)
- end
- end
- end
- function stopper()
- turtle.select(3)
- while turtle.compare() == false do
- for b=0, 9 do
- turtle.select(1)
- if turtle.compare() then
- turtle.turnLeft()
- end
- turtle.select(2)
- if turtle.compare() then
- turtle.turnRight()
- end
- turtle.dig()
- turtle.forward()
- end
- end
- end
- function drop()
- for i=3, 16 do
- local count = turtle.getItemCount(i)
- if count > 0 then
- turtle.select(i)
- turtle.dropDown()
- end
- i = i + 1
- end
- print("inventory empty of shit =]")
- end
- for a=0, 9 do
- print("detecting sugar cane")
- if turtle.detect() then
- fuel()
- stopper()
- drop()
- else
- print("no sugar cane detected")
- end
- os.sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement