Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- local id, command, commandType
- local parameters = {}
- while rednet.isOpen("right") do
- for i=1,5 do
- id, command, parameters[i] = rednet.receive()
- print("my pp: ",parameters[i])
- end
- commandType = parameters[1]
- print("Terminal: ", id)
- print("Has sent command: ", command)
- print("Command type: ", commandType)
- if command == "movement" then
- shell.run("CadeOS/movement.lua", commandType)
- elseif command == "rotate" then
- shell.run("CadeOS/rotate.lua", commandType)
- elseif command == "cadeMine" then
- --[[for i=1,5 do
- id, command, parameters[i] = rednet.receive()
- print("my pp: ",parameters["i"])
- end]]--
- --shell.run("CadeOS/cadeMine.lua",parameters[1],parameters[2],parameters[3],parameters[4],parameters[5])
- elseif command == "cadeMine2" then
- shell.run("CadeOS/cadeMine2.lua")
- else
- print()
- print("Error: Something has gone wrong")
- print()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement