tuekats

cowMilking

Feb 22nd, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for i=1,16 do
  2.         turtle.select(i)
  3.         turtle.dropDown()
  4.     end
  5. while true do
  6.   print("waiting for input signal")
  7.   os.pullEvent("redstone")
  8.   if redstone.getInput("right")==true then
  9.     print("milking...")
  10.     for i=1,16 do
  11.         turtle.select(i)
  12.         turtle.dropDown()
  13.     end
  14.     turtle.select(1)
  15.     while turtle.getItemCount(1)==0 do
  16.         redstone.setOutput("top",true)
  17.         sleep(1)
  18.         redstone.setOutput("top",false)
  19.         sleep(1)
  20.     end
  21.     local detail={}
  22.     detail = turtle.getItemDetail(1)
  23.     while detail["name"]~="minecraft:milk_bucket" do
  24.         turtle.place()
  25.         sleep(1)
  26.         detail = turtle.getItemDetail(1)
  27.     end
  28.     for i=1,16 do
  29.         turtle.select(i)
  30.         turtle.dropDown()
  31.     end
  32.   end
  33. end
Advertisement
Add Comment
Please, Sign In to add comment