Advertisement
xmann110

ultidrive-worker

Feb 15th, 2020
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. rednet.open("left")
  2.  
  3. turtle.select(1)
  4. if turtle.suckDown(1) then
  5.     bottom_item = turtle.getItemDetail().name
  6.     turtle.dropDown(1)
  7. end
  8.  
  9. while true do
  10.     sender, command, protocol = rednet.receive()
  11.     if protocol == "commands" then
  12.         if command.name == "search" then
  13.             if not (bottom_item == nil) then
  14.                 if bottom_item.find(command.item_name) then
  15.                     rednet.send(sender, command.item_name, "search")
  16.                 end
  17.             end
  18.         end
  19.     end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement