Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- length = 5
- width = 4
- height = 2
- a = turtle.getFuelLevel()
- b = length * width * 2 * hoch + width + height
- function walk()
- if turtle.forward() == false then
- while turtle.detect() do
- turtle.dig()
- sleep(0.5)
- end
- while turtle.forward() == false do
- turtle.attack()
- end
- end
- end
- function line()
- for i=1,length,1 do
- walk()
- end
- end
- function level()
- for y=1,width,1 do
- line()
- turtle.turnRight()
- walk()
- turtle.turnRight()
- line()
- turtle.turnLeft()
- walk()
- turtle.turnLeft()
- end
- end
- if turtle.getFuelLevel() > b then
- print " program is running "
- for x=1,height,1 do
- turtle.turnLeft()
- turtle.place()
- level()
- turtle.turnLeft()
- while not turtle.detect() do
- turtle.forward()
- end
- turtle.dig()
- turtle.turnRight()
- turtle.up()
- end
- else
- print . . b - a . . " fuel are remaining "
- end
Advertisement
Add Comment
Please, Sign In to add comment