Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --45 weit 45 breit
- --1 Gravel
- --2 Erde
- --3 Stein
- --14 Fackel
- --15 Kohle
- --16 Kiste
- print("wie weit?")
- weit = io.read()
- print("wieviel zusaetzlich nach oben?")
- print("3+")
- hoch=0+ io.read()
- print("wie breit?")
- breit= io.read()
- function full()
- if turtle.getItemCount(1) > 50 then turtle.select(1) turtle.drop(49) end
- if turtle.getItemCount(2) > 50 then turtle.select(2) turtle.drop(49) end
- if turtle.getItemCount(3) > 50 then turtle.select(3) turtle.drop(49) end
- end
- function fuel()
- while turtle.getFuelLevel() < 500 do
- turtle.select(15)
- turtle.refuel(1)
- end
- end
- function forward()
- while turtle.forward() == false do
- turtle.dig()
- turtle.attack()
- end
- end
- function dig()
- fuel()
- while turtle.detect() == true do
- turtle.dig()
- full()
- turtle.attack()
- sleep(0.5)
- end
- end
- function digUp()
- while turtle.detectUp() == true do
- full()
- turtle.digUp()
- sleep(0.5)
- end
- end
- function digDown()
- full()
- turtle.select(14)
- if turtle.compareDown(14) == false then
- turtle.digDown()
- end
- end
- function unload()
- for x=4,13 do
- turtle.select(x)
- turtle.dropDown()
- end
- turtle.select(14)
- end
- for y=1,breit do
- for x=1,weit do
- digUp()
- turtle.select(16)
- if turtle.compareDown(16) == true then
- unload()
- turtle.select(15)
- else
- digDown()
- end
- dig()
- forward()
- end
- digDown()
- x=0
- while x < hoch do
- digUp()
- turtle.up()
- x=x+1
- end
- turtle.turnLeft()
- turtle.turnLeft()
- for x=1,weit do
- dig()
- digUp()
- digDown()
- forward()
- end
- digUp()
- x=0
- while x < hoch do
- turtle.down()
- x=x+1
- end
- turtle.turnRight()
- for z=1,y-1 do
- turtle.back()
- end
- unload()
- for z=1,y-1 do
- dig()
- forward()
- end
- forward()
- turtle.turnRight()
- end
- turtle.turnLeft()
- for x=1,breit do
- turtle.back()
- end
- turtle.turnRight()
Add Comment
Please, Sign In to add comment