Advertisement
Guest User

bios.lua

a guest
Jul 4th, 2015
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. computer.beep()
  2. drone = component.proxy(component.list("drone")())
  3. computer.beep()
  4. while true do
  5.  computer.beep()
  6.  evt,_,_,msgraw = computer.pullSignal()
  7.  if evt == "chat_message" then
  8.   msg = msgraw:sub(1,1)
  9.   n=tonumber(msgraw:sub(2))
  10.   if n == nil then n = 1 end
  11.   if msg == "y" then
  12.    drone.move(0,n,0)
  13.   elseif msg == "z" then
  14.    drone.move(0,0,n)
  15.   elseif msg == "x" then
  16.    drone.move(n,0,0)
  17.   end
  18.  end
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement