Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trash={"_helmet", "_chestplate", "_leggings", "_boots", "minecraft:bow"}
- print("Emptying chest in front of turtle. Drops trash straight down. Deposits items into inventories below turtle 5 rows behind starting point.")
- print("Will drop any items down containing: ")
- for i=1,#trash do
- print(trash[i])
- end
- fillcount=0
- while true do
- if turtle.getFuelLevel()<100 then
- print("Please refuel me!")
- end
- for i=1,17-fillcount do
- turtle.suck()
- end
- fillcount=0
- for i=1,16 do
- turtle.select(i)
- if turtle.getItemCount(i)>0 then
- data = turtle.getItemDetail(i)
- for j=1,#trash do
- if string.find(data.name,trash[j]) then
- turtle.dropDown()
- fillcount=fillcount-1
- elseif string.find(data.name,"minecraft:coal") then
- if turtle.getFuelLevel()<10000 then
- turtle.refuel()
- fillcount=fillcount-1
- print("Refueled to: "..turtle.getFuelLevel())
- end
- end
- end
- fillcount=fillcount+1
- --print("fillcount="..fillcount)
- end
- end
- if fillcount>15 then
- for i=1,5 do
- emco=0
- turtle.back()
- for i=1,16 do
- turtle.select(i)
- turtle.dropDown()
- if turtle.getItemCount(i)==0 then
- emco=emco+1
- --print("emco="..emco)
- end
- end
- if emco>15 then
- break
- end
- end
- for i=1,5 do
- turtle.forward()
- end
- fillcount=0
- --print("Reset")
- end
- sleep(50)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement