oblinger

Untitled

Mar 14th, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. tArgs = {...}
  2.  
  3. numBlocks = tArgs[1]
  4.  
  5. local function length()
  6. local digLength = tonumber(numBlocks)
  7. if digLength < 5 or = 5 then
  8. printError("Shaft length must be greater than 5")
  9. return false
  10. elseif digLength > 5 then
  11. return digLength
  12. end
  13. end
  14.  
  15. local function beginDig( dLength )
  16. if dLength ~= false then
  17. print("Digging a "..dLength.." block shaft...")
  18. end
  19. end
  20.  
  21. local function dig( dLength2 )
  22. while x < dLength2 or = dLength2 do
  23. x = x + 1
  24. turtle.dig()
  25. turtle.forward()
  26. turtle.digUp()
  27. end
  28. end
  29.  
  30. length()
  31. beginDig( digLength() )
  32. dig( digLength() )
Advertisement
Add Comment
Please, Sign In to add comment