Advertisement
Guest User

Mine

a guest
Apr 17th, 2015
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.43 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. print(
  4. "----------------- Einstellungen -------------------")
  5. print()
  6. textutils.slowWrite("Anzahl der Seitengaenge? : ")
  7.  
  8. a = io.read()
  9.  
  10. print()
  11. textutils.slowWrite("Weite der Seitengaenge   : ")
  12.  
  13. b = io.read()
  14.  
  15. print()
  16. print("Bitte lege 64 Fackeln in den unteren,rechten Slot der Turtle.")
  17. print(
  18. "---------------------------------------------------")
  19.  
  20. c = 0
  21.  
  22. d = 0
  23.  
  24. function AbbV()
  25.    
  26.     while turtle.detect() do          
  27.           turtle.dig()
  28.           sleep(0.5)
  29.     end
  30.  
  31. end
  32.  
  33.  
  34. function AbbO()
  35.    
  36.     while turtle.detectUp() do
  37.           turtle.digUp()
  38.           sleep(0.5)
  39.     end
  40.    
  41. end
  42.  
  43. function lava()
  44.    
  45.     if turtle.detect() then
  46.     else
  47.        turtle.select(1)
  48.        turtle.placeDown()      
  49.        
  50.     end
  51.    
  52. end
  53.  
  54.  
  55. function abb()
  56.    
  57.     AbbV()
  58.     turtle.forward()
  59.     lava()
  60.     AbbO()
  61.    
  62. end
  63.  
  64.  
  65. function sgw()
  66.    
  67.     while c <= b do
  68.    
  69.           abb()
  70.           c = c + 1
  71.          
  72.     end
  73.    
  74. end
  75.  
  76.  
  77. function mg()
  78.  
  79.     while d <= a do
  80.          
  81.           abb()
  82.           abb()
  83.           turtle.turnRight()
  84.           sgw()
  85.           turtle.turnRight()
  86.           turtle.turnRight()
  87.           sgw()
  88.           sgw()
  89.           turtle.turnRight()
  90.           turtle.turnRight()
  91.           sgw()
  92.           turtle.turnLeft()
  93.          
  94.           d = d + 1
  95.    
  96.     end
  97.  
  98. end
  99.  
  100. mg()
  101.  
  102. print("Fertig")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement