Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

[Lua][Computercraft]Holzfarm

DerMarten Jul 7th, 2013 78 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. --By DerMarten
  2. function dig()
  3.    if turtle.detect() == true then
  4.        turtle.dig()
  5.            os.sleep(0.5)
  6.    end
  7. end
  8. function digUp()
  9.    if turtle.detectUp() == true then
  10.        turtle.digUp()
  11.            os.sleep(0.5)
  12.    end
  13. end
  14. function forward()
  15.    turtle.forward()
  16. end
  17. function up()
  18.    turtle.up()
  19. end
  20. function down()
  21.    turtle.down()
  22. end
  23. function fellBaum()
  24.    dig()
  25.    forward()
  26.    digUp()
  27.    for i = 1, 6, 1 do
  28.       up()
  29.           digUp()
  30.    end
  31.    for i = 1,6,1 do
  32.       down()
  33.    end
  34.    turtle.back()
  35. end
  36. function in_kiste()
  37.     turtle.turnRight()
  38.         turtle.select(1)
  39.         turtle.drop()
  40.         turtle.turnLeft()
  41.         turtle.turnLeft()
  42.         turtle.select(2)
  43.         turtle.drop()
  44.         turtle.turnRight()
  45.         os.sleep(0.5)
  46.     zahl = 16
  47.         zahl2 = 1
  48.     for i = 3, zahl, 1 do
  49.            turtle.select(i)
  50.            turtle.drop()
  51.         end
  52.         turtle.select(1)
  53. end
  54. function setzBaum()
  55.    turtle.select(1)
  56.    turtle.place()
  57.    turtle.select(2)
  58.    turtle.place()
  59.    os.sleep(0.5)
  60.    turtle.select(1)
  61. end
  62. function befuelTurtle()
  63.    turtle.turnLeft()
  64.    turtle.suck()
  65.    turtle.turnLeft()
  66.    turtle.turnLeft()
  67.    turtle.select(2)
  68.    turtle.suck()
  69.    turtle.select(1)
  70.    turtle.turnLeft()
  71. end
  72. function anfangWeg()
  73. forward()
  74. forward()
  75. forward()
  76. end
  77. function entladen()
  78.  turtle.turnLeft()
  79.  turtle.turnLeft()
  80.   -------------
  81.   for j=1,6,1 do
  82.   forward()
  83.   forward()
  84.   forward()
  85.   forward()
  86.   end
  87.   -------------
  88.  forward()
  89.  forward()
  90.  forward()
  91.  in_kiste()
  92.  turtle.turnLeft()
  93.  turtle.turnLeft()
  94. end
  95. function main()
  96. befuelTurtle()
  97. anfangWeg()
  98. for i=1,6,1 do
  99.   for f=1,2,1 do
  100.    setzBaum()
  101.    fellBaum()
  102.   end
  103.   forward()
  104.   forward()
  105.   forward()
  106.   forward()
  107. end
  108. entladen()
  109. end
  110. main()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top