SHARE
TWEET

Minecraft Turtle Code (untested)

a guest Dec 19th, 2012 28 Never
  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)
RAW Paste Data
Top