Posted 13 October 2014 - 04:07 AM
I have made a program that will protect you during night.
function Fuel()
turtle.select(1)
turtle.refuel(1)
end
function Move()
if turtle.getFuelLevel() < 10 then
Fuel()
end
turtle.forward()
turtle.attack()
turtle.forward()
turtle.attack()
turtle.forward()
turtle.attack()
turtle.forward()
turtle.attack()
turtle.forward()
turtle.attack()
turtle.forward()
turtle.attack()
turtle.turnRight()
turtle.turnRight()
end
while true do
Move()
end
function Fuel()
turtle.select(1)
turtle.refuel(1)
end
function Move()
if turtle.getFuelLevel() < 10 then
Fuel()
end
turtle.forward()
turtle.attack()
turtle.forward()
turtle.attack()
turtle.forward()
turtle.attack()
turtle.forward()
turtle.attack()
turtle.forward()
turtle.attack()
turtle.forward()
turtle.attack()
turtle.turnRight()
turtle.turnRight()
end
while true do
Move()
end