Illprotectjew

Infini-Quarry

Oct 24th, 2013
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print("       _______ ")
  2. print("     .'_/_|_\_'. ")
  3. print("     \'\  |  /'/")
  4. print("      '\\ | //'")
  5. print("  IPJ   `\|/`  Quarry")
  6. print("Please make sure your enderchest it in my 1st slot :D")
  7. sleep(3)
  8. term.clear()
  9.  
  10. tArgs = { ... }
  11.  
  12. local x = tonumber(tArgs[1] or "")
  13. while not x do
  14.  print("Need a distance to travel in number form")
  15.   x = tonumber(read())
  16.   end
  17.  
  18.  
  19. local y = tonumber(tArgs[1] or "")
  20. while not y do
  21. print ("I need your y coord")
  22. y = tonumber(read())
  23. end
  24.  
  25. y = y - 5
  26.  
  27.  function drop()
  28.  if turtle.getItemCount(16) > 0 then
  29.  turtle.select(1)
  30.  turtle.digDown()
  31.  turtle.placeDown()
  32.  for i=1,16 do
  33.  turtle.select(i)
  34.  turtle.dropDown()
  35.  end
  36.  turtle.select(1)
  37.  turtle.digDown()
  38.  end
  39.  end
  40.      
  41.   function go()
  42.   while not turtle.forward() do
  43.   turtle.attack()
  44.   turtle.dig()
  45.   end
  46.   sleep(0.8)
  47.   end
  48.  
  49.   function dig()
  50.   turtle.digUp()
  51.   sleep(0)
  52.   turtle.dig()
  53.   turtle.digDown()
  54.   drop()
  55.   end
  56.  
  57.   function move()
  58.   sleep(0)
  59.   dig()
  60.   go()
  61.   end
  62.  
  63.   function row()
  64.     for i=1,x do
  65.     sleep(0)
  66.     move()
  67.     end
  68.   end
  69.  
  70.   function row1()
  71.   turtle.turnRight()
  72.   move()
  73.   turtle.turnRight()
  74.   end
  75.  
  76.   function row2()
  77.   turtle.turnLeft()
  78.   move()
  79.   turtle.turnLeft()
  80.   end
  81.  
  82.   function all()
  83.   for i=1,x do
  84.   row()
  85.   row1()
  86.   row()
  87.   row2()
  88.   end
  89.   end
  90.    
  91.   function home()
  92.   turtle.turnLeft()
  93.   for i=1,x do
  94.   sleep(0)
  95.   go()
  96.   go()
  97.   end
  98.   turtle.turnRight()
  99.   for i=1,3 do
  100.   turtle.up()
  101.   turtle.digUp()
  102.   sleep(0)
  103.   end
  104.   end
  105.  
  106.   for i=1,y do
  107.   all()
  108.   home()
  109.   end
Advertisement
Add Comment
Please, Sign In to add comment