le_Fish

test

May 8th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. os.loadAPI("rnApi")
  2. if not fs.exists("rnApi") then
  3. shell.run("pastebin", "get", "2RMg3kFa", "rnApi")
  4. end
  5. os.loadAPI("rnApi")
  6.  
  7. local rn = rnApi.BetterRN:new()
  8. rn:open()
  9.  
  10. function listenRednet()
  11. local response = rn:listen("swarmbot")
  12. for k,v in pairs(response) do
  13. if type(v) ~= "table" then
  14. print(k .. " : " .. v)
  15. else
  16. print(k .. ":")
  17. for x,y in pairs(v) do
  18. print("L: " .. x .. " : " .. y)
  19. end
  20. end
  21. end
  22. end
  23. listenRednet()
Advertisement
Add Comment
Please, Sign In to add comment