Advertisement
Guest User

dial.lua

a guest
Jul 19th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.26 KB | None | 0 0
  1. local component = require("component")
  2. local args = {...}
  3. -- arg1: state arg2:address arg3: adapter
  4. local sg = component.proxy(args[3])
  5. local address = args[2]
  6.  
  7. if args[1] == "true" then
  8.   sg.dial(address)
  9. else if args[1] == "false" then
  10.   sg.disconnect()
  11.   end
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement