Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Programma serbatoio Turtle con Avvisi
- -- Programma di Vorakh
- fRiserva = 100
- fLvl = 500
- fuel = turtle.getFuelLevel()
- -- Controllo presenza carburante nel turtle
- if fuel > 0 then
- print("Livello Carburante: "..fuel)
- -- Controllo se il carburantè è sotto il livello di "riserva")
- if fuel < fRiserva then
- print("Carburante in riserva, consigliato rifornirlo")
- end
- else
- print("Carburante Esaurito")
- print("Inserire Carburante/Carbone/Legno nello 2° slot")
- tempFuel = Fuel
- -- Ciclo di ricarica del turtle fino a
- flag = 1
- while (tempFuel < fLvl) and flag do
- turtle.select(2)
- count = turtle.getItemCount(2)
- if count > 0 then
- turtle.refuel()
- tempFuel = turtle.getFuelLevel()
- else
- print("Turtle ricaricato con il carburante nello slot")
- flag = 0
- end
- end
- print("Turtle rifornito a sufficenza")
- print("Livello Carburante: "..fuel)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement