Advertisement
Guest User

checker

a guest
May 22nd, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | None | 0 0
  1. function checkFuel()
  2.   if(turtle.getFuelLevel()<100) then
  3.     turtle.select(1)
  4.     turtle.placeDown()
  5.     a = peripheral.wrap("bottom")
  6.     a.setColours(colors.black,colors.black,colors.black)
  7.     turtle.suckDown(64)
  8.     turtle.refuel(64)
  9.     turtle.digDown()
  10.     os.sleep(1)
  11.     return
  12.   end
  13.   return
  14. end
  15.  
  16. function checkInv()
  17.   if(turtle.getItemCount(16)>0) then
  18.     turtle.select(1)
  19.     turtle.placeDown()
  20.     a = peripheral.wrap("bottom")
  21.     a.setColours(colors.blue,colors.blue,colors.blue)
  22.     for i=2,16 do
  23.       turtle.select(i)
  24.       turtle.dropDown(64)
  25.     end
  26.     turtle.select(1)
  27.     turtle.digDown()
  28.     os.sleep(1)
  29.   end
  30. end
  31.  
  32. checkFuel()
  33. checkInv()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement