Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("AltUtil.lua")
- alt = peripheral.wrap("front")
- while true do
- sleep(0.1)
- shell.run("clear")
- ing = turtle.getItemDetail()
- if not ing then
- rs.setOutput("left",false)
- print("no item")
- else
- rec = AltUtil.findRec(ing)
- if not rec then
- rs.setOutput("left",false)
- print("invalid item")
- turtle.dropUp()
- else
- if AltUtil.getBlood(alt)<rec.blood then
- print("insufficient blood")
- rs.setOutput("left",true)
- else
- rs.setOutput("left",false)
- print("receipe in progress")
- turtle.drop(1)
- while alt.getItemDetail(1).name~=rec.product.name do
- sleep(0.1)
- end
- alt.pushItems("top",1)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement