Advertisement
efrim

Turtle Snow Generator (computercraft)

Oct 18th, 2013
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | None | 0 0
  1. print ("Snow generator & crafter")
  2.  
  3. j = 0
  4.  
  5.  
  6. while true do
  7.  
  8.     if j % 20 == 0 then
  9.         for i = 1, 16 do
  10.             turtle.select(i)
  11.             turtle.dropDown()
  12.         end
  13.     end
  14.  
  15.     j = j + 1
  16.  
  17.     totalSpace = 0
  18.     totalMined = 0
  19.     turtle.select(1)
  20.    
  21.     for i=1,4 do
  22.         totalSpace = totalSpace + (16 - turtle.getItemCount(i))
  23.     end
  24.    
  25.     while totalMined < totalSpace do
  26.         if turtle.dig() then
  27.             totalMined = totalMined + 1
  28.         end
  29.     end
  30.  
  31.     turtle.select(5)
  32.     turtle.dropDown()
  33.     turtle.select(6)
  34.     turtle.dropDown()
  35.  
  36.     turtle.select(3)
  37.     turtle.transferTo(5)
  38.     turtle.select(4)
  39.     turtle.transferTo(6)
  40.  
  41.     turtle.craft()
  42.  
  43.     turtle.dropDown()
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement