CobraOs

turtle drop up

Oct 25th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. rednet.open("right")
  2.  
  3. recieve = function()
  4. local senderId, message, protocol = rednet.receive()
  5. local senderId, message2, protocol = rednet.receive()
  6. for i=1, tonumber(message) do
  7. turtle.select(tonumber(message2))
  8. turtle.dropUp(1)
  9. end
  10. end
  11.  
  12. fill = function()
  13. for i=1, 16 do
  14. turtle.suckDown()
  15. os.queueEvent("randomEvent")
  16. os.pullEvent()
  17. end
  18. end
  19.  
  20.  
  21. term.clear()
  22. term.setCursorPos(1,1)
  23. term.write(os.getComputerID())
  24. while true do
  25. parallel.waitForAll(fill(), recieve())
  26. end
Advertisement
Add Comment
Please, Sign In to add comment