Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("\n")
- print("****************")
- print("Starting strip mining program by Habnef4")
- print("****************")
- print("\n")
- print("Checking for coal/charcoal in slot one.")
- local ToFillFuel = turtle.getItemSpace(1)
- local CurrentFuel = turtle.getFuelLevel()
- local MaxFuel = turtle.getFuelLimit()
- os.sleep(1)
- if ToFillFuel==64 then
- print("\n")
- print("****************")
- print("Nothing in slot one.")
- print("Ending program to avoid errors.")
- return
- else print("Found items in slot one.")
- end
- local SlotOne = turtle.getItemDetail(1).name
- print("\n\n")
- os.sleep(1)
- if SlotOne == "minecraft:coal" then
- print("\n")
- print("****************")
- print("Found coal/charcoal in slot one.")
- else
- print("Non coal/charcoal item found in slot one.")
- print("Ending program to avoid errors.")
- return
- end
- print("Refuelling")
- if MaxFuel - CurrentFuel >= 15000 then
- print("Low on fuel. Refilling until at 5000 fuel.")
- while true do
- turtle.refuel()
- end
- else
- os.sleep(1)
- print("All fueled up.")
- end
Advertisement
Add Comment
Please, Sign In to add comment