Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("tillapi")
- local positions = { {-3,1,2} , {-2,1,2} , {-1,1,2} ,
- {-3,0,2} , {-2,0,2} , {-1,0,2} ,
- {-3,-1,2} , {-2,-1,2} , {-1,-1,2} }
- local slotList = { 1,2,3,5,6,7,9,10,11}
- function goCrafting(count1)
- tillapi.offsetGoTo(-4,1,2)
- turtle.select(13)
- turtle.place()
- tillapi.offsetGoTo(-4,-1,0)
- turtle.select(slotList[count1])
- while turtle.getItemCount() == 0 do
- redstone.setOutput("bottom",true)
- sleep(1)
- redstone.setOutput("bottom",false)
- sleep(1)
- turtle.suckUp(1)
- end
- --tillapi.offsetGoTo(-4,1,2)
- tillapi.forceMoveBack()
- tillapi.forceMoveBack()
- tillapi.forceMoveUp()
- tillapi.forceMoveUp()
- turtle.select(13)
- turtle.attack()
- local pos = positions[count1]
- tillapi.offsetGoTo(pos[1],pos[2],pos[3])
- turtle.place()
- end
- local count0 = 0
- for key,value in ipairs(positions) do
- count0=count0+1
- tillapi.offsetGoTo(value[1],value[2],value[3])
- turtle.select(13)
- turtle.attack()
- local detail = turtle.getItemDetail(13)
- if detail["name"]=="minecraft:item_frame" then
- turtle.place()
- else
- goCrafting(count0)
- end
- end
- tillapi.offsetGoTo(0,-2,1)
- turtle.select(13)
- turtle.suck()
- turtle.equipRight()
- turtle.drop()
- turtle.select(14)
- turtle.craft()
- turtle.select(13)
- turtle.suck()
- turtle.equipRight()
- turtle.drop()
- tillapi.offsetGoTo(0,-1,1)
- turtle.select(14)
- turtle.drop()
- tillapi.offsetGoTo(0,0,0)
- tillapi.craftRefuel()
Advertisement
Add Comment
Please, Sign In to add comment