Advertisement
giny8i8

digga

Mar 31st, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.04 KB | None | 0 0
  1.  --[FarmFox farming robot]--
  2.  
  3. --[Start of the executable part of program]--
  4.  
  5. local FoSize = 0
  6.  
  7. print("Note: You can put a chest to the Left side of the turtle form collected items")
  8. print()
  9. print("Specify area size to be harvested!")
  10. print("[^] Area size Forward: ")
  11. local FoSize = tostring( read() )
  12. print("[>] Area size Right: ")
  13. local RiSize = tostring( read() )
  14. print("Area size is: "..FoSize.." x "..RiSize)
  15.  
  16.     for i=1,RiSize do
  17.         print("Advancing")
  18.         for i=1,FoSize do          
  19.            turtle.dig()
  20.            turtle.forward()  
  21.         end
  22.        
  23.         print("Reversing "..FoSize.." blocks")
  24.         for i=1,FoSize do
  25.             turtle.back(FoSize)  
  26.         end
  27.        
  28.         print("Next row")
  29.         turtle.turnRight()
  30.         turtle.dig()
  31.         turtle.forward()  
  32.         turtle.turnLeft()
  33.     end
  34.    
  35.     print("Going home")
  36.     turtle.turnLeft()
  37.     for i=1,RiSize do
  38.         turtle.forward()  
  39.     end
  40.    
  41.     print("Unloading")
  42.     for i=1,15 do
  43.         turtle.select(i)
  44.         turtle.drop()
  45.     end
  46.    
  47.     print("Repositioning")
  48.     turtle.turnRight()
  49.     turtle.select(1)
  50.    
  51.     print("Harvesting completed, standing by.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement