MGbeenieboy

Holzfaeller

Jun 14th, 2014
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. -- Baumfaeller Programm fuer ComputerCraft von MGbeenieboy
  2.  
  3. print("["..os.time().."] Programm startet.")
  4.  
  5. turtle.forward()
  6. turtle.forward()
  7. turtle.forward()
  8.  
  9. local function baumFaellt()
  10. turtle.dig()
  11. turtle.forward()
  12. while turtle.detectUp() do
  13. turtle.digUp()
  14. turtle.up()
  15. end
  16. while not turtle.detectDown() do
  17. turtle.down()
  18. end
  19. end
  20.  
  21. turtle.turnLeft()
  22. baumFaellt()
  23. print("["..os.time().."] Erster Baum gefaellt.")
  24.  
  25. for i=1,9 do
  26.  
  27. turtle.back()
  28. turtle.place(13)
  29. print("["..os.time().."] Eiche nachgepflanzt.")
  30. turtle.turnRight()
  31. turtle.turnRight()
  32. baumFaellt()
  33. print("["..os.time().."] Birke gefaellt.")
  34.  
  35. turtle.back()
  36. turtle.place(14)
  37. print("["..os.time().."] Birke nachgepflanzt.")
  38. turtle.turnLeft()
  39. turtle.forward()
  40. turtle.forward()
  41. turtle.turnLeft()
  42. baumFaellt()
  43. print("["..os.time().."] Eiche gefaellt.")
  44.  
  45. end
  46.  
  47. turtle.back()
  48. turtle.place(13)
  49. print("["..os.time().."] Eiche nachgepflanzt.")
  50. turtle.turnRight()
  51. turtle.turnRight()
  52. baumFaellt()
  53. print("["..os.time().."] Birke gefaellt.")
  54.  
  55. --
  56.  
  57. print("["..os.time().."] Zur naechsten Doppelreihe wechseln.")
  58. turtle.turnRight()
  59. turtle.turnRight()
  60. turtle.back()
  61. turtle.place(14)
  62. turtle.turnRight()
  63. turtle.turnRight()
  64. baumFaellt()
  65. turtle.forward()
  66. turtle.turnRight()
  67. turtle.turnRight()
  68. turtle.place(15)
  69. print("["..os.time().."] Zur naechsten Doppelreihe gewechselt!")
  70.  
  71. --
  72.  
  73. for i=1,9 do
  74.  
  75. turtle.turnRight()
  76. turtle.turnRight()
  77. baumFaellt()
  78. print("["..os.time().."] Dschungelbaum gefaellt.")
  79. turtle.back()
  80. turtle.place(16)
  81. print("["..os.time().."] Dschungelbaum nachgepflanzt.")
  82. turtle.turnRight
  83. turtle.forward()
  84. turtle.forward()
  85. turtle.turnRight()
  86. baumFaellt()
  87. print("["..os.time().."] Tannenbaum gefaellt.")
  88. turtle.back()
  89. turtle.place(15)
  90. print("["..os.time().."] Tannenbaum nachgepflanzt.")
  91.  
  92. end
  93.  
  94. print("["..os.time().."] Alle Schleifen beendet. Zurueck zur Start-Position.")
  95. turtle.turnRight()
  96. turtle.turnRight()
  97. baumFaellt()
  98. turtle.back()
  99. turtle.place(16)
  100. turtle.turnRight()
  101. turtle.forward()
  102. turtle.forward()
  103. turtle.forward()
  104. turtle.turnRight()
  105. turtle.forward()
  106. turtle.forward()
  107. turtle.forward()
  108. turtle.forward()
  109. turtle.turnRight()
  110. print("["..os.time().."] Alle Baeume gefaellt. Bereit fuer den naechsten Start.")
Advertisement
Add Comment
Please, Sign In to add comment