Advertisement
Techtronic

Logger: Fuel function

Jan 3rd, 2014
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.28 KB | None | 0 0
  1. fuelcount = turtle.getItemCount(2) --64 charcoal in the slot
  2. function fuel()
  3.  if fuelcount > 1 then
  4.   if turtle.getFuelLevel() < 10 then
  5.    turtle.select(2)
  6.    turtle.refuel(1)
  7.   end
  8.  else
  9.   update() --updates relevent info and prints it to the screen
  10.   sleep(2)
  11.  end
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement