Advertisement
Guest User

Strip

a guest
Nov 21st, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.23 KB | None | 0 0
  1. ---Created by FuQu2---
  2.  
  3. term.clear()
  4. term.setCursorPos(1,1)
  5.  
  6. ----------------------------------------------------------------
  7. print("----------Strip-Mining-----------")
  8. print()
  9. print("Lege Fackeln in den unteren rechten Slot!")
  10. print()
  11. print("---------------------------------")
  12. ----------------------------------------------------------------
  13.  
  14. print("In 10 Sekunden gehts los!!!")
  15. sleep(10)
  16.  
  17. ----------------------------------------------------------------
  18. term.clear()
  19. term.setCursorPos(1,1)
  20.  
  21. print("---------------------------------")
  22. print()
  23. textutils.slowPrint("Anzahl der Nebengaenge:") a = io.read()
  24. a = tonumber(a)
  25. print()
  26. textutils.slowPrint("Laenge der Seitengaenge:") b = io.read()
  27. print()
  28. b = tonumber(b)
  29.  
  30. print("---------------------------------")
  31.  
  32. term.clear()
  33. term.setCursorPos(1,1)
  34. textutils.slowWrite("Mining...")
  35.  
  36. --------Functions start HERE-----------
  37.  
  38. function AbbV()
  39.    
  40.     while turtle.detect() do
  41.       turtle.dig()
  42.       sleep(0.5)
  43.     end
  44.  
  45. end
  46.  
  47.  
  48. function AbbO()
  49.  
  50.     while turtle.detectUp() do
  51.       turtle.digUp()
  52.       sleep(0.5)
  53.     end
  54.  
  55. end
  56.  
  57.  
  58. function Lava()
  59.  
  60.     while not turtle.detectDown() do
  61.       turtle.selectSlot(1)
  62.       turtle.placeDown()
  63.     end
  64.    
  65. end
  66.  
  67.  
  68. function abb()
  69.  
  70.     AbbV()
  71.     sleep(0.5)
  72.     turtle.forward()
  73.     Lava()
  74.     AbbO()
  75.  
  76. end
  77.  
  78.  
  79. function fackel()
  80.  
  81.     turtle.Up()
  82.     turtle.select(16)
  83.     turtle.placeDown()
  84.     turtle.back()
  85.     turtle.down()
  86.    
  87. end
  88.  
  89.  
  90. function mg()
  91.    
  92.     abb()
  93.     turtle.turnRight()
  94.     AbbV()
  95.     turtle.up()
  96.     AbbV()
  97.     turtle.turnLeft()
  98.     turtle.turnLeft()
  99.     AbbV()
  100.     turtle.down()
  101.     AbbV()
  102.     turtle.turnRight()
  103.  
  104. end
  105.  
  106.  
  107. function sgw()
  108.  
  109.   local c = 0  
  110.    
  111.     while c <= b do
  112.      
  113.       abb()
  114.       c = c + 1
  115.      
  116.     end
  117.    
  118.     fackel()
  119.     turtle.turnRight()
  120.     turtle.turnRight()
  121.    
  122.     while c == 1 do
  123.      
  124.       abb()
  125.       c = c - 1
  126.      
  127.     end
  128.  
  129. end
  130.  
  131. -------------I   Main-Script   I------------------
  132.  
  133. local d = 1
  134.  
  135.     while d <= a do
  136.    
  137.       mg()
  138.       mg()
  139.       mg()
  140.       turtle.turnRight()
  141.       sgw()
  142.       sgw()
  143.       turtle.turnLeft()
  144.    
  145.       d = d + 1
  146.    
  147.     end    
  148.  
  149. print("Fertig!!!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement