Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fuelSaid = false
- fuelYes = "Cabbages"
- function fuelCheck()
- fuelLevel = turtle.getFuelLevel()
- while not(fuelLevel > 0) do
- if fuelSaid == false then
- fuelSaidCheck()
- hasFuel = true
- end
- shell.run("refuel all")
- fuelLevel = turtle.getFuelLevel()
- end
- if hasFuel == true then
- shell.run("clear")
- print("I'm Ready, Master. Type: 'Go' to Start")
- fuelGoCheck = read()
- fuelGo()
- end
- shell.run("clear")
- hasFuel = false
- fuelSaid = false
- end
- function fuelGo()
- while not(fuelGoCheck == "Go") do
- print("ERROR! Please try Again")
- print("Once I have Fuel Type: 'Go'")
- fuelGoCheck = read()
- shell.run("clear")
- end
- end
- function fuelAdded()
- while not(fuelYes == "Y") do
- shell.run("clear")
- print("ERROR! Please try Again")
- print("Once I have Fuel, Type: 'Y'")
- fuelYes = read()
- end
- end
- function fuelSaidCheck()
- shell.run("clear")
- print("I need Fuel, Master.")
- print("Once I have Fuel Type: 'Y'")
- fuelYes = read()
- fuelAdded()
- end
- while true do
- fuelCheck()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement