Want more features on Pastebin? Sign Up, it's FREE!
Guest

Minecraft Turtle Code (untested)

By: a guest on Dec 19th, 2012  |  syntax: Lua  |  size: 0.65 KB  |  views: 28  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. --1x3 Meter Mine Shaft
  2.  
  3. --Total number of meters the turtle will crawl
  4. print("How long of a tunnel would you like sir?")
  5. print("")
  6. term.write("Shaft Length: ")
  7. x = math.abs(tonumber(io.read()))
  8.  
  9. while x>0 do
  10. --Detect & Mine for Gravel/Sand falling
  11.   turtle.detect()
  12.   if turtle.detect() == true then
  13.   repeat
  14.     turtle.dig()
  15.     sleep(0.55)
  16.   until turtle.detect() == false
  17.   end
  18.  
  19. --Move forward, dig up and down, completes row.
  20.   turtle.forward()
  21.   turtle.digUp()
  22.   turtle.digDown()
  23.  
  24. --Reduce Row Count
  25.   x = x-1
  26.   print(x.." Meters Left Sir!")
  27.  
  28. end
  29.  
  30. print("Done sir!")
  31. Fuel = turtle.getFuelLevel()
  32. print("Fuel Remaining: "..Fuel)
clone this paste RAW Paste Data