Advertisement
Scarjit

turtleportal v1.0

Jul 13th, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function setTable(name, id)
  2.  books[name] = {}
  3.  books[name][id] = id
  4. end
  5. function fillTable()
  6.  setTable("ChrisHome", 1)
  7.  setTable("Overworld Bhf", 2)
  8. end
  9. turtle.suck()
  10. rednet.open("left")
  11. while true do
  12. a, b, c, d, e = os.pullEvent()
  13. print("A ",a)
  14. print("B ",b)
  15. print("C ",c)
  16.   if a == "rednet_message" then
  17.    if b == 5 then
  18.    fillTable()
  19.     print(textutils.serialize(Books))
  20.     print(Books[c])
  21.     turtle.suck()
  22.     turtle.select(Books[c][])
  23.     turtle.drop()
  24.    end
  25.   end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement