Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local drone = component.proxy(component.list("drone")())
- local modem = component.proxy(component.list("modem")())
- modem.open(301)
- while true do
- local _, localNetworkCard, remoteAdress, port, distance, message = computer.pullSignal("modem_message")
- if tostring(message) == "w" then
- drone.move(0, 0, -1)
- elseif tostring(message) == "a" then
- drone.move(-1, 0, 0)
- elseif tostring(message) == "s" then
- drone.move(0, 0, 1)
- elseif tostring(message) == "d" then
- drone.move(1, 0, 0)
- elseif tostring(message) == "up" then
- drone.move(0, 1, 0)
- elseif tostring(message) == "down" then
- drone.move(0, 1, 0)
- else
- drone.move(0, 0, 0)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement