Advertisement
akihex

LetItSnow

May 9th, 2014
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.07 KB | None | 0 0
  1. local start = false
  2. --local AE = "back"
  3. --local turtleDir = "south"
  4. local head = "top"
  5. local belly = "front"
  6. local feet = "bottom"
  7. local itemIDs = {[head]=86,[belly]=80,[feet]=80}
  8.  
  9. --local ae = peripheral.wrap(AE)
  10.  
  11. local inv = {}
  12. inv[head] = peripheral.wrap(head)
  13. inv[feet] = peripheral.wrap(feet)
  14.  
  15. --local function clearInv()
  16. --  for i = 1,16 do
  17. --    ae.pullItem(turtleDir, i, 64)
  18. --  end
  19. --end
  20.  
  21. local function place(side)
  22.   --local item = inv[side].getStackInSlot(1)
  23.   --if not item then
  24.    
  25.   --elseif item and item.id ~= itemIDs[side] then
  26.   --  print("item mismatch in "..side.." block placer")
  27.    
  28.   --end
  29.   rs.setOutput(side,true)
  30.   sleep(0.1)
  31.   rs.setOutput(side,false)
  32. end
  33.  
  34. while true do
  35.   --place(feet)
  36.   --turtle.select(1)
  37.   --turtle.place()
  38.   --sleep(0.1)
  39.   --place(head)
  40.   --sleep(10)
  41.   if not turtle.detect() then
  42.     if not start then os.pullEvent("redstone") end
  43.     turtle.select(1)
  44.     while not turtle.place() do
  45.       sleep(0.5)
  46.     end
  47.   end
  48.   rs.setOutput("top",true)
  49.   sleep(0.1)
  50.   rs.setOutput("top",false)
  51.   sleep(1)
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement