abc123mewot

Wrath rune crafting

Jan 24th, 2024
982
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print("Necroflower autocrafting turtle")
  2.  
  3. -- ME Interface must be placed in front of the turtle
  4.  
  5. if not fs.exists("utils.lua") then
  6.     print("Downloading Botany Base Utils API")
  7.     shell.run("pastebin get zBLN8K4d utils.lua")
  8. end
  9. os.loadAPI("utils.lua")
  10.  
  11. utils.setSignalItem("minecraft:cobblestone")
  12.  
  13. local expectingFlower = false
  14.  
  15. while true do
  16.     if utils.scanForItem("botania:rune") then
  17.         print("Crafting a necroflower")
  18.         os.sleep(1) -- Wait for the turtle to get all the items from the interface
  19.         utils.dropDownAllItems() -- Drop all items on runic alter
  20.         os.sleep(3) -- Give it some time to craft
  21.         expectingFlower = true
  22.     end
  23.    
  24.     if utils.scanForItem("botania:rune") then
  25.         if expectingFlower then print("Flower was crafted") else print("Got unexpected flower!") end
  26.         utils.dropAllItems(true) -- Also drop the signal item
  27.         expectingFlower = false
  28.         os.sleep(0.1)
  29.     end
  30.    
  31.     if not expectingFlower then -- If a rune is expected to craft then constantly check for it
  32.         if utils.isServerRestartingSoon() then
  33.             break -- Stop crafting if the servers going to restart
  34.         end
  35.         os.sleep(1)
  36.     end
  37. end
  38.  
Advertisement
Add Comment
Please, Sign In to add comment