Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Angelheart vial autocrafting turtle")
- -- ME Interface must be placed in front of the turtle
- if not fs.exists("utils.lua") then
- print("Downloading Botany Base Utils API")
- shell.run("pastebin get zBLN8K4d utils.lua")
- end
- os.loadAPI("utils.lua")
- utils.setSignalItem("minecraft:cobblestone")
- local expectingRune = false
- while true do
- if utils.scanForItem("botania:livingrock") then
- print("Crafting an angelheart vial")
- os.sleep(1) -- Wait for the turtle to get all the items from the interface
- utils.dropDownAllItems() -- Drop all items on runic alter
- os.sleep(3) -- Give it some time to craft
- expectingRune = true
- end
- if utils.scanForItem("xreliquary:angelheart_vial") then
- if expectingRune then print("Angelheart vial was crafted") else print("Got unexpected angelheart vial!") end
- utils.dropAllItems(true) -- Also drop the signal item
- expectingRune = false
- os.sleep(0.1)
- end
- if not expectingRune then -- If a rune is expected to craft then constantly check for it
- if utils.isServerRestartingSoon() then
- break -- Stop crafting if the servers going to restart
- end
- os.sleep(1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment