Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. local k_launcher_channel= 8723
  2. local k_swarm_channel= 6345
  3.  
  4. local wifi= peripheral.wrap("back")
  5.  
  6. while true do
  7. print("Command (launch X, forward X, back X, left X, right X, wall X Y):")
  8.  
  9. local input= string.lower(read())
  10.  
  11. local command= string.find(input, "[^%s]+")
  12.  
  13. if command == "launch" then
  14. wifi.transmit(k_launcher_channel, k_launcher_channel, input)
  15. print("Sent [" .. input .. "] to the launcher.")
  16. else
  17. wifi.transmit(k_swarm_channel, k_swarm_channel, input)
  18. print("Sent [" .. input .. "] to the swarm.")
  19. end
  20.  
  21. print("")
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement