Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Program pro farmici zelvu pro farmareni
- --Verze programu beta 0.8.1
- --vytvoril SVty
- --*****************************
- print("Napiste delku farmy:")
- delka = (read())
- print("Delka farmy je "..delka.. " kostek")
- print("Zadejte sirku farmy:")
- sir = (read())
- print("Sirka farmy je "..sir.." kostek")
- sir = sir /2
- sleep(1)
- function palivo()
- if (turtle.getFuelLevel()) < 20 then
- turtle.select(16)
- turtle.refuel(4)
- turtle.select(1)
- print("doplnuji palivo")
- end
- end
- palivo()
- if (turtle.detectDown()) then
- turtle.up()
- turtle.forward()
- else
- turtle.forward()
- end
- function left()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- end
- function right()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- end
- function farm()
- for del=1,delka do
- turtle.digDown()
- turtle.digDown()
- turtle.select(1)
- turtle.placeDown()
- turtle.forward()
- del = del + 1
- print(del)
- palivo()
- end
- end
- function retu()
- sir = sir *2
- turtle.turnLeft()
- for c=1,sir do
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- --program
- for d=1,sir do
- farm()
- right()
- farm()
- left()
- end
- --program
- retu()
- print("HOTOVO")
Advertisement
Add Comment
Please, Sign In to add comment