Advertisement
buffsovernexus

GPS Helper v1.0.0

May 24th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. --[[
  2.  
  3. GPS_HELPER
  4.  
  5. ]]--
  6.  
  7. -- HANDLE PERIPHERALS --
  8. function findModem()
  9. local periList = peripheral.getNames()
  10.  
  11. for i = 1, #periList do
  12. if peripheral.getType(periList[i]) == "modem" then
  13. return periList[i]
  14. end
  15. end
  16. return nil
  17. end
  18.  
  19. local modem = findModem()
  20.  
  21.  
  22. if rednet.isOpen(modem) == false then rednet.open(modem) end
  23.  
  24. -- Now host for the farmbot.
  25.  
  26. rednet.host("fbtp", os.getComputerLabel())
  27. rednet.host("fbtpa", os.getComputerLabel())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement