Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Wieviele Spiralen? [3/5/7] [max 13]")
- max = tonumber(read())
- print("Wieviele Etagen? [max 5]")
- etage = tonumber(read())
- b = 0
- f = 3
- k = 0
- g = 0
- slot = 3
- if(max >= 7) then
- f=6
- elseif(max >=9 then
- f=9
- end
- function Back()
- turtle.turnRight()
- for x=1, max * g do
- while(turtle.detect() == false) do
- turtle.forward()
- end
- turtle.turnLeft()
- if(turtle.detectDown() == false) then
- turtle.turnLeft()
- for i=1, 5 do
- turtle.down()
- end
- end
- end
- end
- function Hoch()
- turtle.turnRight()
- for x=1, 5 do
- turtle.digUp()
- turtle.up()
- end
- end
- function Sauber()
- for x=0, 13 do
- turtle.select(slot)
- data= turtle.getItemDetail()
- number = turtle.getItemCount()
- if(number > 0) then
- if(data.name=="minecraft:dirt" or data.name=="minecraft:cobblestone") then
- turtle.dropDown()
- end
- end
- slot = slot + 1
- end
- end
- function Abbau()
- if(turtle.detectUp()) then
- turtle.digUp()
- end
- while(turtle.detect()) do
- success, data = turtle.inspect()
- if(success and data.name == "minecraft:gravel") then
- turtle.dig()
- turtle.turnLeft()
- turtle.turnRight()
- else
- turtle.dig()
- end
- end
- end
- function Sicherheit()
- turtle.select(2)
- turtle.turnLeft()
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- turtle.select(1)
- turtle.digDown()
- turtle.placeDown()
- end
- function SicherheitBoden()
- if(turtle.detect() == false) then
- turtle.select(2)
- turtle.placeDown()
- turtle.select(1)
- end
- end
- function Schnecke()
- while(b+4 <= max + f) do
- if(k == 2) then
- b = b + 4
- k = 0
- end
- for i=1, 4+b do
- Abbau()
- turtle.forward()
- SicherheitBoden()
- end
- Sicherheit()
- k = k + 1
- end
- end
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.turnRight()
- turtle.select(2)
- turtle.place()
- turtle.select(1)
- turtle.turnRight()
- turtle.turnRight()
- while(etage >= 1 and etage <= 5) do
- k = 0
- b = 0
- Schnecke()
- if(etage > 1) then
- Hoch()
- end
- etage = etage - 1
- g = g + 1
- end
- Sauber()
- Back()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement