Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Necroflower 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 expectingFlower = false
- while true do
- if utils.scanForItem("botania:rune") then
- print("Crafting a necroflower")
- 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
- expectingFlower = true
- end
- if utils.scanForItem("botania:rune") then
- if expectingFlower then print("Flower was crafted") else print("Got unexpected flower!") end
- utils.dropAllItems(true) -- Also drop the signal item
- expectingFlower = false
- os.sleep(0.1)
- end
- if not expectingFlower 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