Advertisement
Schleimpilz

Untitled

May 19th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. print("Saplings^2?")
  2. x=read()
  3. print("max grow height of your trees?")
  4. y=read()
  5. sidelength=3*(tonumber(x))
  6. forward=sidelength
  7. row=tonumber(x)
  8. rowLength=row
  9. rowCount=0
  10.  
  11. //setup of the treefarm
  12. turtle.up()
  13. while rowCount<=row do
  14.     while rowLength>0 do
  15.         turtle.select(1)
  16.         turtle.forward()
  17.         turtle.digDown()
  18.         turtle.placeDown()
  19.         turtle.forward()
  20.         turtle.forward()
  21.         rowLength=rowLength-1
  22.     end
  23.     rowLength=row
  24.  
  25.     if (rowCount % 2 == 0) then
  26.         turtle.turnLeft()
  27.         turtle.forward()
  28.         turtle.forward()
  29.         turtle.forward()
  30.         turtle.turnLeft()
  31.     end
  32.     else
  33.         turtle.turnRight()
  34.         turtle.forward()
  35.         turtle.forward()
  36.         turtle.forward()
  37.         turtle.turnRight()
  38.     end
  39.     rowCount=rowCount+1
  40.     print(rowCount)
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement