Advertisement
chromaLTS

turtle test17

Apr 6th, 2020
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local function ss(s) turtle.select(s)   end
  2.  
  3. local saplingSpot       = 1
  4. local logSpot           = 2
  5. local emptyStartSpot    = 3
  6. local emptyStopSpot     = 13
  7. local diamondPickSpot   = 14
  8. local enderchestSpot    = 15
  9. local chestSpot         = 16
  10.  
  11.  
  12. term.clear() term.setCursorPos(1,1)
  13. print("----------------------------------")
  14. print("------ChromaLTS's treefarm--------")
  15. print("-> Slot " ..     saplingSpot     ..  ": Sapling(any)")
  16. print("-> Slot " ..     logSpot         ..  ": Log(1)")
  17. print("-> Slot " ..     diamondPickSpot ..  ": Diamond Pickaxe(1)")
  18. print("-> Slot " ..     enderchestSpot  ..  ": Enderchest(1)")
  19. print("-> Slot " ..     chestSpot       ..  ": Chest(1)")
  20. print("----------------------------------")
  21. read()
  22.  
  23. --empty into chest
  24.  
  25. local function Main(Refuel, PickupEnderchest)
  26.     --check fuel level else stuff dont work
  27.    
  28.     turtle.up()
  29.     ss(enderchestSpot)
  30.     turtle.placeDown()
  31.     turtle.suckDown()
  32.  
  33.     turtle.refuel()
  34.     PickupEnderchest()
  35.  
  36.     print("New fuel level -> " .. turtle.getFuelLevel())
  37. end
  38.  
  39. local function ParkInventory()
  40.    
  41.     ss(chestSpot)
  42.     turtle.placeUp()
  43.  
  44.     for i=emptyStartSpot,emptyStopSpot,1 do
  45.         ss(i)
  46.         turtle.dropUp()
  47.     end
  48. end
  49.  
  50. local function PickupEnderchest()
  51.     ss(diamondPickSpot)
  52.     turtle.equipRight()
  53.     turtle.digDown()
  54.     turtle.equipRight()
  55. end
  56.  
  57.  
  58. local function Refuel()
  59.     --for i=emptyStartSpot,emptyStopSpot,1 do
  60.         --ss(i)
  61.         turtle.refuel()
  62.     --end
  63. end
  64.  
  65. local function CheckFuel()
  66. -- TODO
  67. -- Do this
  68. end
  69.  
  70.  
  71.  
  72. --get stuff back
  73.  
  74.  
  75.  
  76. Main(Refuel, PickupEnderchest)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement