ecco7777

CC Genetic Sampler and Apiary Species Sampling Automation

Nov 30th, 2025 (edited)
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.83 KB | None | 0 0
  1. if #fs.find("hashlist")==0 then
  2. shell.run("pastebin get FBVLGpd9 hashlist")
  3. end
  4. shell.run("hashlist")
  5. a=peripheral.wrap("front")
  6. im=peripheral.wrap("top")
  7.  
  8. print("start")
  9. function checkItem()
  10. name=turtle.getItemDetail(1).name
  11. found=false
  12.     if string.find(name,"Princess")~=nil then
  13.     turtle.drop()
  14.     found=true
  15.     end
  16.     if string.find(name,"Drone")~=nil then
  17.     turtle.drop(1)
  18.     turtle.dropUp()
  19.     found=true
  20.     end
  21.     if found==false then
  22.     turtle.dropDown()
  23.     end
  24. end
  25.  
  26. function checkFrame()
  27.     fstatus=false
  28.     if a.getStackInSlot(10)~=nil then
  29.         if a.getStackInSlot(10).dmg<40 then
  30.             fstatus=true
  31.         else
  32.             print("replace frame :(")
  33.             io.read()
  34.         end
  35.     else
  36.         print("add frame :(")
  37.         io.read()
  38.     end
  39.     return fstatus
  40. end
  41.  
  42. function checkSample()
  43.     smple=im.getStackInSlot(4)
  44.     if smple~=nil then
  45.     print("checking sample..")
  46.         if sample[smple.nbt_hash]~=nil then
  47.         print("found Species "..sample[smple.nbt_hash].value.." Sample")
  48.         needSample=false
  49.         print("cleaning up..")
  50.         im.destroyStack(3)
  51.         turtle.suckUp()
  52.         turtle.dropDown()
  53.             while a.getStackInSlot(1)~=nil do
  54.             sleep(1)
  55.             end
  56.             for i=3,9 do
  57.                 a.pushItem("up",i,64)
  58.             end
  59.         else
  60.         im.pushItem("up",4,1)
  61.         end
  62.     end
  63. end
  64.  
  65. needSample=true
  66. while needSample do
  67.     print("breeding bee..")
  68.     while a.getStackInSlot(1)~=nil and checkFrame() do
  69.     checkSample()
  70.     sleep(1)
  71.     end
  72.     for i=1,7 do
  73.     turtle.suck()
  74.         if turtle.getItemCount(1) > 0 then
  75.         print("extracting bees..")
  76.         checkItem()
  77.         else
  78.         i=7
  79.         end
  80.     end
  81.     sleep(1)
  82. end
  83. print("Done! Ready for next Queen!")
  84.  
  85.  
Advertisement
Add Comment
Please, Sign In to add comment