Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local hw = fs.open("report", fs.exists("report") and "a" or "w")
- local hr = fs.open("report", fs.exists("report") and "r")
- print("Skok dlina?")
- length = read()
- num_lenght = tonumber(length)
- print("OK. Dlina ustanovlena: ", length)
- print("-----")
- print("Skok shirina?")
- width = read()
- num_width = tonumber(width)
- print("OK. Shirina ustanovlena: ", width)
- print("~~~~~")
- print("Total info:")
- print("Length: ", length)
- print("Width: ", width)
- print("Fuel lvl: ", turtle.getFuelLevel())
- sleep(7)
- while num_lenght > 0 do
- turtle.suck()
- turtle.suckUp()
- turtle.forward()
- num_lenght = num_lenght - 1;
- print("Ostalos xodov: ", num_lenght)
- if num_lenght < 1 then
- turtle.turnRight()
- while num_width > 1 do
- turtle.forward()
- num_width = num_width - 1;
- end
- num_width = tonumber(width)
- turtle.turnRight()
- num_lenght = tonumber(length)
- print("Povorachivayu obratno...")
- print("Fuel lvl: ", turtle.getFuelLevel())
- end
- end
Add Comment
Please, Sign In to add comment