Advertisement
Schneemann

cmdTerminal

Jun 23rd, 2020
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.14 KB | None | 0 0
  1. local component = require("component")
  2.  
  3. while true do
  4. print("Type Message")
  5. input = io.read()
  6. end
  7.  
  8. --Functions
  9. function parse(input)
  10.  out = {}
  11.  sep = "%s"
  12.  for str in string.gmatch(input, "([^"..sep.."]+)") do
  13.   table.insert(out, str)
  14.  end
  15.  for addr, row in ipairs(addresses) do
  16.   if out[2] == row.dest then
  17.    dest = row.address
  18.   end
  19.  end
  20.  msg = out[3]
  21. end
  22.  
  23. function help()
  24.  
  25. end
  26.  
  27. function print(from,text)
  28.  time =
  29.  print("[" .. from .. "]" .. "[" .. time .. "]" .. """ .. text .. """)
  30. end
  31.  
  32. function send(output)
  33.  component.modem.send("25630b44-6b43-46e5-abcb-7a84b0aea85c",7727,output)
  34.  print("Sent Message: " .. output)
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement