MGbeenieboy

Untitled

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