Chutny

ComputerCraft - Less Stupid: Refueler

Jun 6th, 2021 (edited)
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. print ("------------")
  2. print ("Less Stupid: Refueler")
  3. print ("------------")
  4. print ("Place: All items to refuel with in inventory.")
  5. print (" ")
  6. print ("Do you wish to refuel? y/n")
  7. print ("---------------------------")
  8. local event, param1 = os.pullEvent("char")
  9.  
  10. if param1 == "y" then
  11.     for i = 1, 16 do
  12.         turtle.select(i)
  13.         turtle.refuel()
  14.     end
  15. end
  16.    
  17. print ("Fuel level is: "..turtle.getFuelLevel())
Add Comment
Please, Sign In to add comment