Advertisement
Guest User

startup

a guest
May 21st, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.24 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3.  
  4. local x = 0
  5. print("Operation Started!")
  6.  
  7. while x == 0 do
  8.   if turtle.getFuelLevel() < 60 then
  9.     x = 1
  10.     print("No more fuel!")
  11.   end
  12.  
  13.   turtle.select(1)
  14.   for i = 1, 3 do
  15.     turtle.dig()
  16.     turtle.forward(1)
  17.   end
  18.  
  19.   turtle.turnLeft()  
  20.   for i = 1, 2 do
  21.     turtle.dig()
  22.     turtle.forward(1)
  23.   end
  24.  
  25.   turtle.turnLeft()
  26.  
  27.   for i = 1, 2 do
  28.     turtle.dig()
  29.     turtle.forward(1)
  30.   end
  31.  
  32.   turtle.turnLeft()
  33.   turtle.dig()
  34.   turtle.turnRight()
  35.  
  36.   if turtle.drop(8) == false then
  37.     x = 1
  38.     print("No more space for livingrock!")
  39.   end
  40.  
  41.   turtle.turnLeft()
  42.   turtle.select(2)
  43.   turtle.place()
  44.   turtle.turnRight()
  45.  
  46.   for i = 1, 2 do
  47.     turtle.back()
  48.     turtle.place()
  49.    end
  50.    
  51.    turtle.turnRight()
  52.    
  53.    for i = 1, 2 do
  54.      turtle.back()
  55.      turtle.place()
  56.    end
  57.    
  58.    turtle.turnRight()
  59.    
  60.    for i = 1, 3 do
  61.      turtle.back()
  62.      turtle.place()
  63.    end
  64.    
  65.    turtle.turnLeft()
  66.    turtle.turnLeft()
  67.    
  68.    if turtle.suck(8) == false then
  69.      x = 1
  70.      print("No more stone!")
  71.    end
  72.    
  73.    turtle.turnLeft()
  74.    turtle.turnLeft()
  75. sleep(60)      
  76. end
  77.  
  78. print("An error has occured and")
  79. print("the program has shut down!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement