Advertisement
Guest User

drone bios

a guest
Oct 18th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1. local drone = component.proxy(component.list("drone")())
  2. local modem = component.proxy(component.list("modem")())
  3. modem.open(301)
  4. while true do
  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
  19.     drone.move(0, 0, 0)
  20.   end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement