bigtwisty

Hole

Apr 6th, 2013
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. -- dig a hole and put water at bottom
  2.  
  3. local args = {...}
  4.  
  5. if not (#args == 2) then
  6. print("Usage: hole [depth] [water height]")
  7. else
  8. print("Place items as follows...")
  9. print("-------------------------")
  10. print("| Water bucket in 1")
  11. print("| Sign in 2")
  12.  
  13. while (turtle.getItemCount(1)==0) and (turtle.getItemCount(2)==0) do
  14. os.sleep(0.1)
  15. end
  16.  
  17. for i=args[2],args[1] do
  18. turtle.digDown()
  19. turtle.down()
  20. end
  21.  
  22. turtle.select(1)
  23. turtle.placeUp()
  24.  
  25. for i=1,args[2]
  26. turtle.digDown()
  27. turtle.down()
  28. end
  29.  
  30. turtle.select(2)
  31. turtle.placeUp()
  32.  
  33. turtle.digDown()
  34. turtle.down()
  35. end
Advertisement
Add Comment
Please, Sign In to add comment