Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Written by Protocol73 For ComputerCraft 1.6
- --Settings (Move to .cfg)
- modemside = "left"
- reciverID = nil
- protocol = nil
- hostname = "Test-55"
- Debug = true
- --functions (Maybe move to P73_core_functions.lua)
- function Debugger(debugItem, debugdata) --For Output of Debug Data
- if Debug == true then
- print("---DEBUGGING OUTPUT---")
- print("Debug data from",debugItem)
- print(debugdata)
- print("---END DEBUGGING OUTPUT---")
- else
- --Output no debug info if false
- end
- end
- function RemoteRunLine(RunThis ,NETrepy2)
- shell.run(RunThis)
- end
- --REDNET CODE
- rednet.open(modemside)
- NETsenderID, NETMessage, NETprotocol = rednet.receive()
- --Check Protocol of Data Received
- if NETprotocol == "TestNet" then
- Debugger("Remote PC via TestNet:",NETMessage)
- print("Received from PC-ID#",NETsenderID)
- elseif NETprotocol == "RemoteRun" then
- NETrepy2 = NETsenderID
- RemoteRunLine(NETMessage,NETrepy2)
- else
- print("Got Message via unknown protocol")
- if Debug == false then
- print("Set Debug = true to see info")
- else
- Debugger(NETprotocol, NETMessage)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement