Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function isModemName(name)
- if name == "top" or name == "bottom" or name == "front" or name == "back" or name == "left" or name == "right" then
- return true
- end
- return false
- end
- function isModem (name)
- if peripheral.isPresent(name) and peripheral.getType(name) == "modem" then
- return true
- end
- return false
- end
- args = {...}
- if table.getn(args) ~= 2 then
- print("NetRepeat By UDXS")
- print("Error: Incorrect Usage")
- print("Correct Format: \"NetRepeat <Modem1> <Modem2>\"")
- return
- end
- if not isModemName(args[1]) and not isModemName(args[2]) then
- print ("NetRepeat By UDXS")
- print("Error: Invalid Modem Names")
- print("Possible Names: \"top\", \"bottom\", \"front\", \"back\", \"left\", \"right\"")
- return
- end
- if not isModem(args[1]) and not isModem(args2) then
- print"NetRepeat By UDXS")
- print("Error: One or More Modems Not Connected")
- print("Possible Names: \"top\", \"bottom\", \"front\", \"back\", \"left\", \"right\"")
- return
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement