Advertisement
AyrA

[LUA] Turtle digger script

Feb 6th, 2013
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. local i=0
  2.  
  3. function p()
  4.     term.clear()
  5.     term.setCursorPos(1,1)
  6.     print(i.." Blocks")
  7. end
  8.  
  9. while true do
  10.   while turtle.detect() do
  11.     turtle.dig()
  12.     i=i+1
  13.     p()
  14.   end
  15.   while turtle.detectDown() do
  16.     turtle.digDown()
  17.     i=i+1
  18.     p()
  19.   end
  20.   while turtle.detectUp() do
  21.     turtle.digUp()
  22.     i=i+1
  23.     p()
  24.   end
  25.   sleep(0.125)
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement