Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p=peripheral.wrap("bottom")
- function craft(i1)
- if i1~=6 then
- p.pushItem("up",items[i1].pos[1],1,1)
- p.pushItem("up",items[i1].pos[2],1,2)
- p.pushItem("up",items[i1].pos[3],1,5)
- p.pushItem("up",items[i1].pos[4],1,6)
- turtle.craft()
- turtle.dropDown()
- else
- for i1=1,items[6].qty do
- p.destroyStack(items[6].pos[i1])
- end
- end
- end
- function scan()
- items={{qty=0,pos={}},{qty=0,pos={}},{qty=0,pos={}},{qty=0,pos={}},{qty=0,pos={}},{qty=0,pos={}},{qty=0,pos={}},{qty=0,pos={}}}
- p.condenseItems()
- for i=1,p.getInventorySize() do
- item=p.getStackInSlot(i)
- if item~=nil then
- if string.find(item.name,"lootbag") then
- items[item.dmg+1].pos[#items[item.dmg+1].pos+1]=i
- items[item.dmg+1].qty=items[item.dmg+1].qty+1
- else
- if item.name~="1MinicioEssence" then
- p.destroyStack(i)
- end
- end
- end
- end
- end
- while true do
- scan()
- for i2=1,#items do
- if items[i2].qty>=4 then
- craft(i2)
- end
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement