Advertisement
Hurde

hoi

Feb 1st, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. --Ini locals
  2. local SPRUCE = 0
  3.  
  4. --Ini Functions
  5. function clear()
  6. term.clear()
  7. term.setCursorPos(1,1)
  8. end
  9. --End Ini
  10.  
  11. --Main code
  12. clear()
  13. print("Want some living wood?")
  14. while true do
  15. turtle.select(1)
  16. if turtle.compare == true then
  17. print("spruce detected")
  18. SPRUCE = 1
  19. end
  20. turtle.select(2)
  21. if turtle.compare() == true then
  22. turtle.dig()
  23. elseif SPRUCE == 0 then
  24. turtle.select(1)
  25. turtle.place()
  26. print("placed new spruce")
  27. os.sleep(2)
  28. end
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement