Advertisement
Darknio

wall

Jun 26th, 2022
651
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. slot = 1
  2.  
  3.  
  4. function Text()
  5. term.clear()
  6. term.setCursorPos(1,1)
  7.  
  8. end
  9. fuel = turtle.getFuelLevel()
  10.  
  11. function Start()
  12.     Item()
  13.     Text()
  14.         term.write("Treibstoffanzeige: "..fuel)
  15.         term.setCursorPos(1,2)
  16.         term.write("Wie tief ist das Loch? ")
  17.         down = tonumber(read())
  18.         downTwo = down * 2
  19.        
  20. end
  21.  
  22. function Item()
  23. item = turtle.getItemCount()
  24. if item == 0 then
  25.         slot = slot + 1
  26.     turtle.select(slot)
  27. else
  28.  
  29.     turtle.select(slot)
  30.  
  31. end
  32.  
  33. end
  34.  
  35.  
  36. function Hole()
  37.     fuel = turtle.getFuelLevel()
  38.     if fuel > downTwo then
  39.  
  40.  
  41.         for i = 1,down do
  42.             for i =1,4 do
  43.                 Item()
  44.                 turtle.place()
  45.                 turtle.turnLeft()
  46.             end
  47.             turtle.down()
  48.         end
  49.         for i = 1,down do
  50.             turtle.up()
  51.         end
  52.     else
  53.         Text()
  54.         term.write("Ich habe zuwenig Sprint!")
  55.         term.setCursorPos(1,2)
  56.         term.write("Bitte nachfüllen in Slot 1: ")
  57.         term.setCursorPos(1,3)
  58.         term.write(fuel .. "/"..downTwo)
  59.         turtle.refuel()
  60.         sleep(0.5)
  61.         Fuel()
  62.  
  63.  
  64.  
  65.  
  66.         end
  67. end
  68.  
  69. Start()
  70. Hole()
  71.  
  72.  
  73.  
Advertisement
RAW Paste Data Copied
Advertisement