Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local s = 1 -- Slot numer
- function place()
- if turtle.detectDown() == true then
- turtle.digDown()
- turtle.placeDown()
- else
- turtle.placeDown()
- end
- end
- function forward()
- if turtle.detect() == true then
- repeat
- turtle.dig()
- until turtle.detect() == false
- turtle.forward()
- else
- turtle.forward()
- end
- end
- turtle.select(s)
- term.write("Wie lange soll eine Zaunseite sein: ")
- local length = read()-1
- print()
- write("ben�B6tige Z�A4une: ")
- print(length*4)
- print("Bitte in Slot 16 einen Zaun extra legen!")
- if turtle.getFuelLevel() >= length then
- print()
- print("Treibstoff Ok")
- print()
- term.write("Zum Starten - go - eintippen: ")
- local start = read()
- if start == "go" then
- for j = 0, 3, 1 do
- for i = 1, length, 1 do
- if turtle.getItemCount(s) >= 1 and turtle.compareTo(16) == true then
- place()
- forward()
- else
- repeat
- s = s + 1
- turtle.select(s)
- until turtle.compareTo(16) == true
- place()
- forward()
- end
- end
- turtle.turnRight()
- end
- term.clear()
- print("Fertig")
- else
- print("falsche Eingabe")
- end
- else
- print()
- print("zu wenig Treibstoff! Bitte erst nachladen!")
- end
Advertisement
Add Comment
Please, Sign In to add comment