Advertisement
asweigart

Untitled

Feb 10th, 2016
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. -- ComputerCraft script to display fuel stats
  2. io.write(tostring(turtle.getFuelLevel()), ' / ', tostring(turtle.getFuelLimit()), '\n')
  3. local amt = 100 * turtle.getFuelLevel() / turtle.getFuelLimit()
  4. print(tostring(amt) .. '%')
  5. if amt < 100 then
  6. print('Fuel needed: ' .. tostring(turtle.getFuelLimit() - turtle.getFuelLevel()))
  7. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement