Features:
- Send any command over rednet - you don't need to define them in the server code
- Receiver:
side = "back"
password = "InsertYourPasswordHere!"
rednet.open(side)
while true do
id, msg = rednet.receive()
a = textutils.unserialize(msg)
if a[1] == password then
file = fs.open("tempfile", "a")
for i = 2, #a do
file.write(a[i])
end
file.close()
shell.run("tempfile")
fs.delete("tempfile")
end
end
- Sender:
tCommand = {"InsertYourPasswordHere!", "Command ", "Arguments"
a = textutils.serialize(tCommand)
rednet.broadcast(a)
WARNING:
You need Spaces (" ") between the command itself and the arguments! you can either use
"Command ", "Arg1 ", "Arg2"
or"Command", " ", "Arg1", " ", "Arg2"
And if you need Quotes inside Quotes, for example
"print('AnyOutput')"
then you need to use " to define your string and ' for a string inside your string :)/>/> Example usages:
- Take any wireless mining turtle, place it in front of a computer with the mining script and watch it search diamonds for you.
- Have a computer connected to a monitor and control it via console
V Alpha 0.2: Added Password function!
V Alpha 0.1: first release!
Future plans:
some Functions: sendCommand(password, command) and receiveCommand(password)