Hiranus

NightMaker

Jun 2nd, 2015
763
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.09 KB | None | 0 0
  1. local stone_axe = nil
  2. local quicklime = nil
  3.  
  4. function Activate_Ritual ()
  5.     rs.setOutput("bottom", true)
  6.     sleep(5)
  7.     rs.setOutput("bottom",false)
  8. end
  9.  
  10. function Is_Quicklime ()
  11.     slot = turtle.getItemDetail()
  12.     if slot == nil then
  13.         return false
  14.     end
  15.     if slot["name"] == "witchery:ingredient" then
  16.         if slot["damage"] == 16 then
  17.             return true
  18.         end
  19.     end
  20.     return false
  21. end
  22. function Is_Stone_Axe ()
  23.     slot = turtle.getItemDetail()
  24.     if slot == nil then
  25.         return false
  26.     end
  27.     if slot["name"] == "minecraft:stone_axe" then
  28.         return true
  29.     end
  30.     return false
  31. end
  32. while true do
  33.     if (os.time() > 5.5) and (os.time() < 19) then
  34.         stone_axe = nil
  35.         quicklime = nil
  36.         for i=1,16 do
  37.             turtle.select(i)
  38.             if Is_Quicklime() then
  39.                 quicklime = i
  40.             end
  41.             if Is_Stone_Axe() then
  42.                 stone_axe = i
  43.             end
  44.         end
  45.         if (quicklime == nil) or (stone_axe == nil) then
  46.              print("MISSIMG INGREDIENTS")
  47.         else
  48.             turtle.select(stone_axe)
  49.             turtle.dropDown(1)
  50.             turtle.select(quicklime)
  51.             turtle.dropDown(1)
  52.             sleep(1)
  53.            
  54.             Activate_Ritual()
  55.         end
  56.     end
  57.     sleep(1)
  58. end
Advertisement
Add Comment
Please, Sign In to add comment