resaloli

TurtlePortal

Sep 9th, 2015
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rednet.open("right")
  2. function waitMSG()
  3.     event, senderId, message, distance = os.pullEvent("rednet_message")
  4.     print("Abrindo Portal n: "..message)
  5.     doJob(message)
  6. end
  7.  
  8. function doJob(id)
  9.   setBook(id)
  10.   sleep(10)
  11.   getBook(id)
  12. end
  13.  
  14. function getBook(id)
  15.   turtle.select(id)
  16.   turtle.suck()
  17. end
  18.  
  19. function setBook(id)
  20.   turtle.select(id)
  21.   turtle.drop()
  22. end
  23.  
  24.  
  25.  
  26.  
  27. while true do
  28.   waitMSG()
  29. end
Add Comment
Please, Sign In to add comment