Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CID=os.getComputerID()
- msg=CID..", "..os.getComputerLabel()
- modem = peripheral.find("modem")
- if not modem then
- print("modem not found")
- return
- end
- modemside = peripheral.getName(modem)
- rednet.open(modemside)
- while true do
- id, receive, protocol = rednet.receive()
- message = receive:lower()
- words = { ... }
- for word in message:gmatch("%S+") do
- table.insert(words, word)
- end
- if words[1] == "teleport" then
- print(id..", "..message)
- shell.run(message)
- elseif words[1] == "get" then
- print(id..", "..message)
- if #words < 2 then
- print("missing arguments")
- return
- end
- if words[2] == "teleporter" then
- print("sending teleporter name..")
- rednet.send(id,msg,protocol)
- end
- end
- end
- print("programm end")
Advertisement
Add Comment
Please, Sign In to add comment