Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p=peripheral.wrap("bottom")
- function craft(i1,i2)
- i2=(i2-math.fmod(i2,4))/4
- p.pushItem("up",i1,i2,1)
- p.pushItem("up",i1,i2,2)
- p.pushItem("up",i1,i2,5)
- p.pushItem("up",i1,i2,6)
- turtle.craft()
- if string.find(item.name,"powdered") then
- turtle.dropUp()
- else
- turtle.drop()
- end
- end
- p.condenseItems()
- for i=1,p.getInventorySize() do
- item=p.getStackInSlot(i)
- if item~=nil then
- if string.find(item.name,"broken") or string.find(item.name,"crushed") or string.find(item.name,"powdered") then
- if item.qty>=4 then
- craft(i,item.qty)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement