Advertisement
Guest User

tunnelp

a guest
Nov 27th, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function ClearScreen()
  2.   term.clear()
  3.   term.setCursorPos(1,1)
  4. end
  5.  
  6. function CheckFuel()
  7.   while turtle.getFuelLevel() < 10 do
  8.     ClearScreen()
  9.     print("Out of fuel!")
  10.   end
  11. end
  12. function CheckInv()
  13.   for x = 1,16 do
  14.         itemCount = itemCount + turtle.getItemCount(x)
  15.   end
  16.   while itemCount < 8 do
  17.         ClearScreen()
  18.         print("Out of blocks!")
  19.   end
  20. end
  21.  
  22. local cycles = 0
  23.  
  24. print("How long do you want it to run??")
  25. cycles = read()
  26. for i = 0, cycles do
  27.   CheckFuel()
  28.   CheckInv()
  29.   turtle.forward()
  30.   turtle.turnRight()
  31.   turtle.place()
  32.   turtle.turnLeft()
  33.   turtle.turnLeft()
  34.   turtle.place()
  35.   turtle.turnRight()
  36.   turtle.up()
  37.   turtle.turnLeft()
  38.   turtle.place()
  39.   turtle.turnRight()
  40.   turtle.turnRight()
  41.   turtle.place()
  42.   turtle.turnLeft()
  43.   turtle.placeUp()
  44.   turtle.down()
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement