Advertisement
simondrechsel

turtle_wall

Nov 17th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. curslot = 1
  2.  
  3. function selnextslot()
  4. curslot = curslot + 1
  5. if curslot > 16 then
  6. print("Keine Bloecke mehr!")
  7. error()
  8. end
  9. turtle.select(curslot)
  10. end
  11.  
  12. function checkblockcount()
  13. if turtle.getItemCount(curslot) == 0 then
  14. selnextslot()
  15. end
  16. end
  17.  
  18. function place()
  19. for i=1,12 do
  20. checkblockcount()
  21. turtle.placeDown()
  22. turtle.forward()
  23. turtle.forward()
  24. end
  25. end
  26.  
  27. function mover()
  28. place()
  29. turtle.turnRight()
  30. turtle.forward()
  31. turtle.forward()
  32. turtle.forward()
  33. turtle.forward()
  34. turtle.turnRight()
  35. turtle.forward()
  36. end
  37.  
  38. function movel()
  39. place()
  40. turtle.turnLeft()
  41. turtle.forward()
  42. turtle.forward()
  43. turtle.forward()
  44. turtle.forward()
  45. turtle.turnLeft()
  46. turtle.forward()
  47. end
  48.  
  49. --------------------------
  50. -- PROGRAM --
  51. --------------------------
  52.  
  53. turtle.up()
  54. turtle.turnRight()
  55. turtle.forward()
  56. turtle.turnLeft()
  57. for i=1,3 do
  58. mover()
  59. movel()
  60. end
  61. turtle.turnRight()
  62. turtle.turnRight()
  63. turtle.forward()
  64. turtle.turnRight()
  65. for i=1,22 do
  66. turtle.forward()
  67. end
  68. print(" ")
  69. print(" ")
  70. print(" ")
  71. print(" ")
  72. print(" ")
  73. print(" ")
  74. print(" ")
  75. print(" ")
  76. print(" ")
  77. print(" ")
  78. print("===========================")
  79. print("Ebene erfolgreich erstellt!")
  80. print("===========================")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement