Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function failsafe()
- turtle.select(1)
- if not turtle.compareTo(1) then
- print("Brak sadzonek")
- print("Nacisnij jakikolwiek przycisk by wylaczyc komputer...")
- os.pullEvent("key")
- stop()
- end
- turtle.select(2)
- if not turtle.compareTo(2) then
- print("Brak maczki kostnej")
- print("Nacisnij jakikolwiek przycisk by wylaczyc komputer...")
- os.pullEvent("key")
- stop()
- end
- turtle.select(3)
- if not turtle.compareTo(3) then
- print("Brak paliwa")
- print("Nacisnij jakikolwiek przycisk by wylaczyc komputer...")
- os.pullEvent("key")
- stop()
- end
- end
- function stop()
- os.shutdown()
- end
- function chop()
- turtle.dig()
- turtle.digUp()
- turtle.up()
- end
- Bonemealcount = 20
- while true do
- failsafe()
- while turtle.getFuelLevel() <= 20 do
- turtle.select(3)
- turtle.refuel(1)
- end
- turtle.select(1)
- turtle.place()
- turtle.select(2)
- for i = 1, Bonemealcount do
- turtle.place()
- end
- while turtle.detect() do
- chop()
- end
- while not turtle.detectDown() do
- turtle.down()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement