View difference between Paste ID: UNVupfh7 and G5G7hK9H
SHOW: | | - or go back to the newest paste.
1
local drone = component.proxy(component.list("drone")())
2
local modem = component.proxy(component.list("modem")())
3-
modem.open(301)
3+
4
  modem.open(301)
5
  local _, localNetworkCard, remoteAdress, port, distance, message = computer.pullSignal("modem_message")
6
  if tostring(message) == "w" then
7
    drone.move(0, 0, -1)
8
  elseif tostring(message) == "a" then
9
    drone.move(-1, 0, 0)
10
  elseif tostring(message) == "s" then
11
    drone.move(0, 0, 1)
12
  elseif tostring(message) == "d" then
13
    drone.move(1, 0, 0)
14
  elseif tostring(message) == "up" then
15
    drone.move(0, 1, 0)
16
  elseif tostring(message) == "down" then
17
    drone.move(0, -1, 0)
18-
  else
18+
  elseif tostring(message) == "break up" then
19-
    drone.move(0, 0, 0)
19+
    drone.swing(1)
20
  elseif tostring(message) == "break down" then
21
    drone.swing(0)
22
  elseif tostring(message) == "break front" then
23
    drone.swing(2)
24
  elseif tostring(message) == "break back" then
25
    drone.swing(3)
26
  elseif tostring(message) == "break left" then
27
    drone.swing(5)
28
  elseif tostring(message) == "break right" then
29
    drone.swing(4)
30
  end
31
end