arcticmunkii

hai

May 11th, 2013
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function fuel()
  2.     if turtle.getFuelLevel() <= 10 then
  3.         turtle.select(16)
  4.         turtle.refuel()
  5.     end
  6. end
  7.  
  8. function dig()
  9.     local length = 50
  10.    
  11.     for i=1, length, 1 do
  12.         turtle.dig()
  13.        
  14.         turtle.forward()
  15.         turtle.digUp()
  16.        
  17.        
  18.         turtle.turnLeft()
  19.         turtle.dig()
  20.        
  21.         turtle.forward()
  22.  
  23.         turtle.digUp()
  24.        
  25.  
  26.         turtle.turnRight()
  27.         turtle.turnRight()
  28.         turtle.forward()
  29.        
  30.         turtle.dig()
  31.        
  32.         turtle.forward()
  33.         turtle.digUp()
  34.        
  35.  
  36.         turtle.turnLeft()
  37.         turtle.turnLeft()
  38.  
  39.         turtle.forward()
  40.         turtle.turnRight()
  41.    
  42.     end
  43.    
  44.  
  45. end
  46.  
  47. rednet.open("right")
  48. while true do
  49.     message = rednet.receive()
  50.     if message == "hai" then
  51.         fuel()
  52.         dig()
  53.     end
  54. end
Advertisement
Add Comment
Please, Sign In to add comment