Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- turtle.cleanInventory = function(mod)
- -- turn around, dig 3 forward and drop all shit here
- turtle.turnRight()
- turtle.turnRight()
- turtle.saveDig()
- turtle.saveForward()
- turtle.saveDig()
- turtle.saveForward()
- turtle.saveDig()
- if mod==0 then
- turtle.saveDig()
- turtle.saveForward()
- end
- turtle.saveDigDown()
- for i = 1,4 do
- turtle.select(i)
- -- drop all but one
- --turtle.dropDown( turtle.getItemCount(i)-1 )
- for j = 5,16 do
- turtle.select(j)
- -- compare to good
- if not turtle.compareTo(i) then
- -- drop all trash
- turtle.dropDown()
- end
- end
- end
- -- go back to original pos
- turtle.turnRight()
- turtle.turnRight()
- if mod==0 then
- turtle.saveDig()
- turtle.saveForward()
- end
- turtle.saveDig()
- turtle.saveForward()
- turtle.saveDig()
- turtle.saveForward()
- turtle.saveDig()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement