Advertisement
Muzze77

Beesorter_The112Pack

Nov 19th, 2020 (edited)
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.30 KB | None | 0 0
  1. shell.run("clear")
  2. ap = peripheral.wrap("back")
  3. itemsR = peripheral.wrap("right")
  4. itemsL = peripheral.wrap("left")
  5.  
  6.  
  7. while true do
  8.     term.clear()
  9.     term.setCursorPos(1,1)
  10.    
  11.     if ap.getQueen() then
  12.         print("hasQueen")
  13.            
  14.     else
  15.         print("hasNoQueen")
  16.         items = ap.list()
  17.         i = 0
  18.         for v, k in pairs(items) do
  19.             if string.match(k.name,"drone") ~= nil then
  20.                   if i == 0 then
  21.             if ap.getDrone() then
  22.                 print("hasDrone")
  23.                 ap.pushItems("right",v)
  24.                 sleep(0.1)
  25.             else   
  26.                       print("hasNoDrone")
  27.                           i = i + 1
  28.                           ap.drop(v)
  29.                           sleep(0.1)
  30.                           ap.suck()
  31.             end
  32.                   else
  33.                       print("hasDrone")
  34.                       ap.pushItems("right",v)
  35.                       sleep(0.1)
  36.                   end
  37.             elseif string.match(k.name,"princess") ~= nil then
  38.                  print("hasNoPrincess")
  39.                  ap.drop(v)
  40.                  sleep(0.1)
  41.                  ap.suck()
  42.             else
  43.                 ap.pushItems("left",v)
  44.                 sleep(0.1)
  45.             end
  46.            
  47.        
  48.         end
  49.            
  50.                    
  51.     end
  52.     sleep(1)
  53.  
  54. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement