ecco7777

CC Genetic Sampler and Apiary Species Sampling Automation

Nov 30th, 2025 (edited)
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.49 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 checkSample()
  27.     smple=im.getStackInSlot(4)
  28.     if smple~=nil then
  29.     print("checking sample..")
  30.         if sample[smple.nbt_hash]~=nil then
  31.         print("found Species "..sample[smple.nbt_hash].value.." Sample")
  32.         needSample=false
  33.         print("cleaning up..")
  34.         im.destroyStack(3)
  35.         turtle.suckUp()
  36.         turtle.dropDown()
  37.             while a.getStackInSlot(1)~=nil do
  38.             sleep(1)
  39.             end
  40.             for i=3,9 do
  41.                 a.pushItem("up",i,64)
  42.             end
  43.         else
  44.         im.pushItem("up",4,1)
  45.         end
  46.     end
  47. end
  48.  
  49. needSample=true
  50. while needSample do
  51.     print("breeding bee..")
  52.     while a.getStackInSlot(1)~=nil do
  53.     checkSample()
  54.     sleep(1)
  55.     end
  56.     for i=1,7 do
  57.     turtle.suck()
  58.         if turtle.getItemCount(1) > 0 then
  59.         print("extracting bees..")
  60.         checkItem()
  61.         else
  62.         i=7
  63.         end
  64.     end
  65.     sleep(1)
  66. end
  67. print("Done! Ready for next Queen!")
  68.  
  69.  
Advertisement
Add Comment
Please, Sign In to add comment