Advertisement
max9076

Untitled

Feb 2nd, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.27 KB | None | 0 0
  1. --Benutzerinfos
  2. --
  3. --Es muss mindestens 1024 Fuel eingefüllt sein.
  4. --Wie das geht? Fuel in einen beliebigen Slot legen und anschließend "refuel all" schreiben.
  5. --
  6. --Folgende Items/Blöcke müssen in folgende Slots:
  7. --Slot 2: Irgendwelche Blöcke (vorzugsweise Erde, Cobble o.ä.)
  8. --Slot 16: 12 Landmarks
  9. --
  10. --Wie man die Quarries am Ende aufstellt:
  11. --Die anliegenden Landmarks einer Landmark, welche nun verbunden werden soll, abbauen
  12. --Landmark rechtsklicken, Viereck entsteht
  13. --In die Form (siehe Slot 3/4) die Quarry stellen
  14. --Gleiches Vorgehen bei den restlichen Quarries
  15. --Anschließend noch Tesseracts einstellen
  16. --
  17. --Geschrieben von FunSpammbot / JenoMiners
  18. --Der Code ist zwar kaum lesbar und unuebersichtlich, jedoch sollte alles funktionieren.
  19. --Auftretende Bugs bitte im Forum reporten.
  20.  
  21. --Standardgedöns
  22. term.clear()
  23. term.setCursorPos(1, 1)
  24. --Standardgedöns
  25.  
  26. --Funktion für öfteren Gebrauch
  27. function checkForBlockAndDig()
  28.  if turtle.forward() == false then
  29.         repeat
  30.         turtle.dig()
  31.         turtle.digUp()
  32.         sleep(0.3)
  33.         until turtle.forward() == true
  34.  end
  35.  if turtle.detectUp() == true
  36.  then
  37.  turtle.digUp()
  38.  end
  39. end
  40.  
  41. --Abfragen
  42. if turtle.getItemCount(16) < 12 --Landmarks
  43. then
  44. print("Zu wenig Landmarks. Lege mindestens 12 Landmarks in Slot 16 ab und starte anschliessend das Programm neu.")
  45. return
  46. end
  47.  
  48. if turtle.getFuelLevel() < 1024 --Fuel
  49. then
  50. print("Zu wenig Fuel. Bitte in einen beliebigen Slot Kohle o.ä. einfüllen und 'refuel all' ausführen. Dann Programm neustarten.")
  51. return
  52. end
  53.  
  54. if turtle.getItemCount(2) < 32
  55. then
  56. print("Zu wenige Baublöcke. Bitte mehr in Slot 2 einlegen. Minimum 32.")
  57. return
  58. end
  59.  
  60.  
  61. --Plattformbau
  62. turtle.select(2)
  63. turtle.turnLeft()
  64. checkForBlockAndDig()
  65. turtle.turnRight()
  66. turtle.placeDown()
  67. for i = 1,3 do
  68. checkForBlockAndDig()
  69. turtle.placeDown()
  70. end
  71. turtle.digUp()
  72. turtle.turnRight()
  73. checkForBlockAndDig()
  74. turtle.turnRight()
  75. turtle.placeDown()
  76. for i = 1,2 do
  77. checkForBlockAndDig()
  78. turtle.placeDown()
  79. end
  80. turtle.digUp()
  81. turtle.forward()
  82. turtle.turnLeft()
  83. checkForBlockAndDig()
  84. turtle.placeDown()
  85. turtle.turnLeft()
  86. for i = 1,3 do
  87. checkForBlockAndDig()
  88. turtle.placeDown()
  89. end
  90. turtle.turnRight()
  91. checkForBlockAndDig()
  92. turtle.placeDown()
  93. turtle.turnRight()
  94. for i = 1,3 do
  95. checkForBlockAndDig()
  96. turtle.placeDown()
  97. end
  98. turtle.turnRight()
  99. turtle.digUp()
  100. for i = 1,2 do
  101. turtle.forward()
  102. end
  103. turtle.turnRight()
  104. --Plattformbau
  105.  
  106. --Graben der Wege und/oder Setzen der Landmarks
  107. turtle.forward()
  108. turtle.turnLeft()
  109. for i = 1,64 do --Weg zur 1. und 2. Landmark
  110. checkForBlockAndDig()
  111. end
  112. turtle.turnLeft()
  113. checkForBlockAndDig()
  114. turtle.select(2)
  115. turtle.placeDown()
  116. turtle.back()
  117. turtle.select(16)
  118. turtle.place()
  119. for i = 1,2 do
  120. turtle.turnRight()
  121. end
  122. for i = 1,2 do
  123. checkForBlockAndDig()
  124. end
  125. turtle.select(2)
  126. turtle.placeDown()
  127. turtle.back()
  128. turtle.select(16)
  129. turtle.place()
  130. turtle.turnRight()
  131. for i = 1,63 do --Weg zurueck von der 1. und 2. Landmark
  132. checkForBlockAndDig()
  133. end
  134.  
  135. turtle.turnLeft()
  136. turtle.place()
  137. turtle.turnRight()
  138. for i = 1,66 do --Weg zu der 3. und 4. Landmark
  139. checkForBlockAndDig()
  140. end
  141. turtle.turnLeft()
  142. checkForBlockAndDig()
  143. turtle.select(2)
  144. turtle.placeDown()
  145. turtle.back()
  146. turtle.select(16)
  147. turtle.place()
  148. for i = 1,2 do
  149. turtle.turnRight()
  150. end
  151. for i = 1,2 do
  152. checkForBlockAndDig()
  153. end
  154. turtle.select(2)
  155. turtle.placeDown()
  156. turtle.back()
  157. turtle.select(16)
  158. turtle.place()
  159. turtle.turnRight()
  160. for i = 1,63 do --Weg zurück von der 3. und 4. Landmark
  161. checkForBlockAndDig()
  162. end
  163.  
  164. turtle.turnLeft()
  165. turtle.place()
  166. turtle.turnRight()
  167. turtle.forward()
  168. turtle.turnLeft()
  169. for i = 1,64 do --Weg zu der 5. und 6. Landmark
  170. checkForBlockAndDig()
  171. end
  172. turtle.turnLeft()
  173. checkForBlockAndDig()
  174. turtle.select(2)
  175. turtle.placeDown()
  176. turtle.back()
  177. turtle.select(16)
  178. turtle.place()
  179. for i = 1,2 do
  180. turtle.turnRight()
  181. end
  182. for i = 1,2 do
  183. checkForBlockAndDig()
  184. end
  185. turtle.select(2)
  186. turtle.placeDown()
  187. turtle.back()
  188. turtle.select(16)
  189. turtle.place()
  190. turtle.turnRight()
  191. for i =1,63 do --Weg zurueck von der 5. und 6. Landmark
  192. checkForBlockAndDig()
  193. end
  194.  
  195. turtle.turnLeft()
  196. turtle.place()
  197. turtle.turnRight()
  198. for i = 1,66 do --Weg zur 7. und 8. Landmark
  199. checkForBlockAndDig()
  200. end
  201. turtle.turnLeft()
  202. checkForBlockAndDig()
  203. turtle.select(2)
  204. turtle.placeDown()
  205. turtle.back()
  206. turtle.select(16)
  207. turtle.place()
  208. for i = 1,2 do
  209. turtle.turnRight()
  210. end
  211. for i = 1,2 do
  212. checkForBlockAndDig()
  213. end
  214. turtle.select(2)
  215. turtle.placeDown()
  216. turtle.back()
  217. turtle.select(16)
  218. turtle.place()
  219. turtle.turnRight()
  220. for i = 1,63 do --Weg zurueck von der 7. und 8. Landmark
  221. checkForBlockAndDig()
  222. end
  223. --Graben der Wege und/oder Setzen der Landmarks
  224.  
  225.  
  226. --Setzen der Tesseracts
  227. turtle.turnLeft()
  228. turtle.place()
  229. turtle.turnRight()
  230. turtle.select(3)
  231. turtle.forward()
  232. turtle.place()
  233. turtle.turnRight()
  234. turtle.forward()
  235. turtle.turnLeft()
  236. turtle.place()
  237. turtle.back()
  238. turtle.place()
  239. turtle.turnLeft()
  240. turtle.forward()
  241. turtle.turnRight()
  242. turtle.place()
  243. --Setzen der Tesseracts
  244.  
  245. turtle.select(4)
  246. turtle.up()
  247. turtle.forward()
  248. turtle.turnLeft()
  249. turtle.place()
  250. turtle.turnRight()
  251. turtle.forward()
  252. turtle.turnLeft()
  253. turtle.place()
  254. for i = 1,2 do turtle.turnRight()
  255. end
  256. turtle.forward()
  257. turtle.place()
  258. turtle.turnRight()
  259. turtle.forward()
  260. turtle.turnLeft()
  261. turtle.place()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement