Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- size_x = 9
- size_y = 9
- x = 0
- y = 0
- a = 0
- timer = 0
- function move()
- turtle.forward()
- turtle.digDown()
- turtle.placeDown()
- end
- function move2()
- turtle.forward()
- end
- function farm()
- while y ~= size_y do
- for o = 1, size_x do
- move()
- end
- a = a+1
- if a % 2 == 0 then
- turtle.turnLeft()
- move()
- turtle.turnLeft()
- else
- turtle.turnRight()
- move()
- turtle.turnRight()
- end
- y = y + 1
- end
- if y == size_y then
- turtle.turnRight()
- turtle.turnRight()
- for u = 1, 9 do
- turtle.forward()
- end
- turtle.turnRight()
- for t = 1, 9 do
- turtle.forward()
- end
- y = 0
- timer = 800
- end
- end
- function graph()
- term.clear()
- term.setCursorPos(1, 1)
- print("Il y a : " + turtle.getFuelLevel() + " fuel")
- print("Temps avant récolte : " + timer + " secondes")
- os.sleep(1)
- timer = timer - 1
- end
- function refuel()
- while turtle.getFuelLevel() < 80 do
- print("REFUEL !!!! SLOT 2 MINIMUM 5 CHARBONS")
- turtle.select(2)
- turtle.refuel(5)
- end
- end
- while true do
- refuel()
- graph()
- if timer == 0 then
- farm()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement