local x = 3 local y = 1 local z = 4 local fuel = 0 local Verbrauch = 0 -- function FuelCount() -- if (Verbrauch > turtle.getFuelLevel()) then -- write(tostring(Verbrauch)) -- write(" > ") -- term.write(tostring(turtle.getFuelLevel())) -- end -- end function VerbrauchErmitteln() Verbrauch = 14.8571 * radius * radius - 10.0571 * radius + 12.2 end function fforward() while (turtle.forward() == false) do fdig() sleep(0.4) end fuel = fuel + 1 end function fdigUp() while(turtle.detectUp()) do turtle.digUp() sleep(0.4) end end function fdig() while(turtle.detect()) do turtle.dig() sleep(0.4) end end function Reihe() turtle.turnRight() fdig() fdigUp() turtle.up() fdig() turtle.turnLeft() turtle.turnLeft() fdig() turtle.down() fdig() turtle.turnRight() turtle.digDown() turtle.down() turtle.turnRight() fdig() turtle.turnLeft() turtle.turnLeft() fdig() turtle.turnRight() turtle.up() fuel = fuel + 4 end function Block() fforward() for i = 1, x - 1 do Reihe() fforward() end Reihe() turtle.back() turtle.turnRight() turtle.forward() fuel = fuel + 2 end print("Hallo Welt!") term.write("Radius? ") radius = tonumber(read()) VerbrauchErmitteln() while (Verbrauch > turtle.getFuelLevel()) do term.write("Radius? ") radius = tonumber(read()) VerbrauchErmitteln() end Block() while z < radius do x = 3 * y Block() Block() y = y + 1 z = z + 3 end write("Verbrauchte Energie: ") write(tostring(fuel))