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")())
- while true do
- modem.open(301)
- 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)
- elseif tostring(message) == "break up" then
- drone.swing(1)
- elseif tostring(message) == "break down" then
- drone.swing(0)
- elseif tostring(message) == "break front" then
- drone.swing(2)
- elseif tostring(message) == "break back" then
- drone.swing(3)
- elseif tostring(message) == "break left" then
- drone.swing(5)
- elseif tostring(message) == "break right" then
- drone.swing(4)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement