Advertisement
CaptainSpaceCat

Nighttime Eternal

Apr 18th, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.96 KB | None | 0 0
  1. obs = 13
  2.  
  3. while true do
  4.   axe = 0
  5.   quicklime = 0
  6.   time = os.time()
  7.   if time < 4.750 and time > 4.250 then
  8.     turtle.up()
  9.     turtle.select(obs)
  10.     turtle.placeDown()
  11.     for i = 1, 12 do
  12.       turtle.select(i)
  13.       item = turtle.getItemDetail()
  14.       if item then
  15.         if item.name == "minecraft:stone_axe" then
  16.           axe = turtle.getSelectedSlot
  17.           print(axe, ": Axe detected...")
  18.         end
  19.         if item.name == "witchery:ingredient" and item.damage == 16 then
  20.           quicklime = turtle.getSelectedSlot()
  21.           print(quicklime: "Quicklime detected...")
  22.         end
  23.       end
  24.     end
  25.     if axe == 0 or quicklime == 0 then
  26.       print("!!!ALERT: Out of supplies. Daytime imminent!!!")
  27.     else
  28.       print("Daylight detected. Removing...")
  29.       turtle.select(axe)
  30.       turtle.drop()
  31.       turtle.select(quicklime)
  32.       turtle.drop()
  33.       trtl.use()
  34.       turtle.digDown()
  35.       turtle.down()
  36.     end
  37.   end
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement