Advertisement
ecco7777

CC Stripmine Porgramm, das Bauser von Nikon geklaut hat und ich verbessert habe, da es 2 error hatte

Mar 3rd, 2022 (edited)
1,341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.56 KB | None | 0 0
  1. print("----------------------")
  2. print("|##Turtle aktiviert##|")
  3. print("----------------------")
  4.  
  5. local torch = turtle.getItemCount(1)
  6. local chest = turtle.getItemCount(2)
  7. local fuel = turtle.getFuelLevel()print("----------------------")
  8. print("|##Turtle aktiviert##|")
  9. print("----------------------")
  10.  
  11. local torch = turtle.getItemCount(1)
  12. local chest = turtle.getItemCount(2)
  13. local fuel = turtle.getFuelLevel()
  14. local sk = 0
  15.  
  16. local function Check()
  17.  
  18. print("------------------------------------")
  19. print("|Überprüfung von der Turtle##      |")
  20. print("------------------------------------")
  21.     os.sleep(3)
  22.     if torch > 0 then
  23.         print("Fackeln sind in der Turtle")
  24.     else
  25.         print("!!Keine Fackeln (Slot 1)!!")
  26.         os.sleep(3.5)
  27.         os.shutdown()
  28.     end
  29.    
  30.     if chest > 0 then
  31.         print("Es befindet sich mind. 1 Kiste in der Turtle")
  32.     else
  33.         print("!!Keine Kiste (Slot 2)!!")
  34.         os.sleep(3.5)
  35.         os.shutdown()
  36.     end
  37.    
  38.     while fuel < 1000 do
  39.         print("!!Bitte Tank auffüllen und Enter!!")
  40.         os.read()
  41.         shell.run("refuel all")
  42.         Check()
  43.     end
  44.    
  45. end
  46.  
  47. function doStuff2()
  48.     for i = 1,5 do
  49.  
  50.         while turtle.detect()==true do
  51.             turtle.dig()
  52.             os.sleep(0.5)
  53.         end
  54.  
  55.     turtle.forward()
  56.     turtle.digUp()
  57.     turtle.digDown()
  58.     end
  59. end
  60.  
  61. function doStuff()
  62.  
  63.     doStuff2()
  64.     for i = 1,2 do
  65.         turtle.turnLeft()
  66.     end
  67.     doStuff2()
  68.  
  69. end
  70.  
  71. function Main()
  72.  
  73. Check()
  74.  
  75. print("--------------------")
  76. print("|Anzahl der Gänge: |")
  77. print("--------------------")
  78. ag = io.read()
  79. print("--------------------")
  80. print("|Es werden         |")
  81. print(ag)
  82. print("|Gänge abgebaut!   |")
  83. print("--------------------")
  84. os.sleep(2)
  85.  
  86.     for i = 1,ag do
  87.  
  88.         for i = 1,3 do
  89.    
  90.             while turtle.detect()==true do
  91.                 turtle.dig()
  92.                 os.sleep(0.5)
  93.                 turtle.digUp()
  94.                 os.sleep(0.5)
  95.             end
  96.        
  97.         turtle.forward()
  98.         turtle.digUp()
  99.         turtle.digDown()
  100.         end
  101.             turtle.turnLeft()
  102.    
  103.         doStuff()
  104.         doStuff()
  105.    
  106.             turtle.select(1)
  107.             turtle.place()
  108.             turtle.turnRight()
  109.  
  110.         if turtle.getItemCount(16)>0 then
  111.             if chest > 0 then
  112.                 turtle.select(2)
  113.                 turtle.digDown()
  114.                 turtle.placeDown()
  115.                 chest = chest -1
  116.                     for slot = 3,16 do
  117.                         turtle.select(slot)
  118.                         turtle.dropDown()
  119.                         sleep(1.5)
  120.                     end
  121.                 turtle.select(3)
  122.             else
  123.                 print("-----------------------------")
  124.                 print("|Keine Kisten mehr vorhanden|")
  125.                 print("-----------------------------")
  126.                 os.sleep()
  127.             end
  128.         end
  129.     end
  130.    
  131.     turtle.turnLeft()
  132.     turtle.turnLeft()
  133.    
  134.     zg = ag*3
  135.        
  136.         for i = 1,zg do
  137.             turtle.forward()
  138.         end
  139.     print("-------------------------")
  140.     print("|##Fertig##             |")
  141.     print("|Programmiert von Nykon!|")
  142.     print("|Korrigiert von ecco7777!|")
  143.     print("-------------------------")
  144. end
  145.  
  146. local function Support()
  147.     print("----------------------------------------")
  148.     print("|##Möchtest du eine Einleitung haben?##|")
  149.     print("|Ja = 1 / Nein = 0                     |")
  150.     print("----------------------------------------")
  151.    
  152.     input = io.read()
  153.     sk = tonumber(input)
  154.    
  155.         if sk == 1 then
  156.             print("-----------------------------------")
  157.             print("|##Bitte beolfe diese Schritte!## |")
  158.             print("|Pack Fackeln in den 1 Slot       |")
  159.             print("|Pack mind 1. Kiste in die Turtle |")
  160.             print("Habe mind. 1000 im Tank           |")
  161.             print("|Ein Gang besteht aus ^=3 und <>=5|")
  162.             print("-----------------------------------")
  163.             print("")
  164.             Main()
  165.         else
  166.             Main()
  167.         end
  168. end
  169.  
  170.     Support()
  171. local sk = 0
  172.  
  173. local function Check()
  174.  
  175. print("------------------------------------")
  176. print("|Überprüfung von der Turtle##      |")
  177. print("------------------------------------")
  178.     os.sleep(3)
  179.     if torch > 0 then
  180.         print("Fackeln sind in der Turtle")
  181.     else
  182.         print("!!Keine Fackeln (Slot 1)!!")
  183.         os.sleep(3.5)
  184.         os.shutdown()
  185.     end
  186.    
  187.     if chest > 0 then
  188.         print("Es befindet sich mind. 1 Kiste in der Turtle")
  189.     else
  190.         print("!!Keine Kiste (Slot 2)!!")
  191.         os.sleep(3.5)
  192.         os.shutdown()
  193.     end
  194.    
  195.     while fuel < 1000 do
  196.         print("!!Bitte Tank auffüllen und Enter!!")
  197.         os.read()
  198.         shell.run("refuel all")
  199.         Check()
  200.     end
  201.    
  202. end
  203.  
  204. function doStuff2()
  205.     for i = 1,5 do
  206.  
  207.         while turtle.detect()==true do
  208.             turtle.dig()
  209.             os.sleep(0.5)
  210.         end
  211.  
  212.     turtle.forward()
  213.     turtle.digUp()
  214.     turtle.digDown()
  215.     end
  216. end
  217.  
  218. function doStuff()
  219.  
  220.     doStuff2()
  221.     for i = 1,2 do
  222.         turtle.turnLeft()
  223.     end
  224.     doStuff2()
  225.  
  226. end
  227.  
  228. function Main()
  229.  
  230. Check()
  231.  
  232. print("--------------------")
  233. print("|Anzahl der Gänge: |")
  234. print("--------------------")
  235. ag = io.read()
  236. print("--------------------")
  237. print("|Es werden         |")
  238. print(ag)
  239. print("|Gänge abgebaut!   |")
  240. print("--------------------")
  241. os.sleep(2)
  242.  
  243.     for i = 1,ag do
  244.  
  245.         for i = 1,3 do
  246.    
  247.             while turtle.detect()==true do
  248.                 turtle.dig()
  249.                 os.sleep(0.5)
  250.                 turtle.digUp()
  251.                 os.sleep(0.5)
  252.             end
  253.        
  254.         turtle.forward()
  255.         turtle.digUp()
  256.         end
  257.             turtle.turnLeft()
  258.    
  259.         doStuff()
  260.         doStuff()
  261.    
  262.             turtle.select(1)
  263.             turtle.place()
  264.             turtle.turnRight()
  265.  
  266.         if turtle.getItemCount(16)>0 then
  267.             if chest > 0 then
  268.                 turtle.select(2)
  269.                 turtle.digDown()
  270.                 turtle.placeDown()
  271.                 chest = chest -1
  272.                     for slot = 3,16 do
  273.                         turtle.select(slot)
  274.                         turtle.dropDown()
  275.                         sleep(1.5)
  276.                     end
  277.                 turtle.select(3)
  278.             else
  279.                 print("-----------------------------")
  280.                 print("|Keine Kisten mehr vorhanden|")
  281.                 print("-----------------------------")
  282.                 os.sleep()
  283.             end
  284.         end
  285.     end
  286.    
  287.     turtle.turnLeft()
  288.     turtle.turnLeft()
  289.    
  290.     zg = ag*3
  291.        
  292.         for i = 1,zg do
  293.             turtle.forward()
  294.         end
  295.     print("-------------------------")
  296.     print("|##Fertig##             |")
  297.     print("|Programmiert von Nykon!|")
  298.     print("|Korrigiert von ecco7777!|")
  299.     print("-------------------------")
  300. end
  301.  
  302. local function Support()
  303.     print("----------------------------------------")
  304.     print("|##Möchtest du eine Einleitung haben?##|")
  305.     print("|Ja = 1 / Nein = 0                     |")
  306.     print("----------------------------------------")
  307.    
  308.     input = io.read()
  309.     sk = tonumber(input)
  310.    
  311.         if sk == 1 then
  312.             print("-----------------------------------")
  313.             print("|##Bitte beolfe diese Schritte!## |")
  314.             print("|Pack Fackeln in den 1 Slot       |")
  315.             print("|Pack mind 1. Kiste in die Turtle |")
  316.             print("Habe mind. 1000 im Tank           |")
  317.             print("|Ein Gang besteht aus ^=3 und <>=5|")
  318.             print("-----------------------------------")
  319.             print("")
  320.             Main()
  321.         else
  322.             Main()
  323.         end
  324. end
  325.  
  326.     Support()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement