Advertisement
Guest User

awaitCMD

a guest
May 19th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. protocol = "swarm"
  2. hostID = 1
  3. os.loadAPI("/api/stringUtils")
  4. os.loadAPI("/api/cmdUtils")
  5. rednet.open("left")
  6.  
  7. sender,msg,distance,protocol = rednet.receive(protocol,60)
  8. tmpData = textutils.unserialize(msg)
  9.  
  10. result = cmdUtils.attempt(cmdUtils.translate(tmpData[1]),tmpData[2])
  11. rednet.send(hostID,textutils.serialize(result),protocol)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement