thatparadox

dislocatorTeleNexus

May 3rd, 2017
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. rednet.open("left")
  2.  
  3. while true do
  4.   destination = "false"
  5.   incId, incMessage = rednet.receive("tele")
  6.   for i = 1,16 do
  7.     if turtle.getItemCount(i) > 0 then
  8.       itemInfo = turtle.getItemDetail(i)
  9.       if itemInfo.name == incMessage then
  10.         destination = tostring(i)
  11.       end
  12.     end
  13.   end
  14.   if destination <> "false" then
  15.     rednet.send(incId, "true", "tele")
  16.     turtle.select(destination)
  17.     turtle.drop()
  18.     sleep(5)
  19.     turtle.suck()
  20.   end
  21. end
Add Comment
Please, Sign In to add comment