Advertisement
henritom

Turtle

Mar 12th, 2022 (edited)
842
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.82 KB | None | 0 0
  1. -- Slot 1 Fuel
  2. -- Slot 2 Torch
  3. -- Slot 3 Chest
  4.  
  5. -- Variables
  6. local check = 0
  7. local status = 0
  8.  
  9. local distance = 0
  10. local distanceX = 0
  11. local distanceY = 0
  12. local distanceZ = 0
  13.  
  14. local nextMine = 3
  15. local nextTorch = 8
  16.  
  17. local itemFuel = turtle.getItemCount(1)
  18. local itemTorch = turtle.getItemCount(2)
  19. local itemChest = turtle.getItemCount(3)
  20.  
  21. -- Checking
  22. local function Check()
  23.     if itemFuel == 0 then
  24.         print("Fuel: 0")
  25.     else
  26.         print("Fuel: ", turtle.getItemCount(1))
  27.         check = check + 1
  28.     end
  29.  
  30.     if itemTorch == 0 then
  31.         print("Torch: 0")
  32.     else
  33.         print("Torch: ", turtle.getItemCount(1))
  34.         check = check + 1
  35.     end
  36.  
  37.     if itemChest == 0 then
  38.         print("Chest: 0")
  39.     else
  40.         print("Chest: ", turtle.getItemCount(1))
  41.         check = check + 1
  42.     end
  43. end
  44.  
  45. -- Fuel & Placing
  46.  
  47. -- Mining
  48.  
  49. -- Start
  50. Check()
  51. Print(check)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement