Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local k_launcher_channel= 8723
- local k_swarm_channel= 6345
- local wifi= peripheral.wrap("back")
- while true do
- print("Command (launch X, forward X, back X, left X, right X, wall X Y):")
- local input= string.lower(read())
- local command= string.find(input, "[^%s]+")
- if command == "launch" then
- wifi.transmit(k_launcher_channel, k_launcher_channel, input)
- print("Sent [" .. input .. "] to the launcher.")
- else
- wifi.transmit(k_swarm_channel, k_swarm_channel, input)
- print("Sent [" .. input .. "] to the swarm.")
- end
- print("")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement