Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local drone = component.proxy(component.list("drone")())
- local m=component.proxy(component.list("modem")())
- m.open(2412)
- local function sleep(timeout)
- checkArg(1, timeout, "number", "nil")
- local deadline = computer.uptime() + (timeout or 0)
- repeat
- computer.pullSignal(deadline - computer.uptime())
- until computer.uptime() >= deadline
- end
- local function receive()
- while true do
- drone.setLightColor(0x0000ff)
- sleep(5)
- drone.move(0, 23, 0)
- sleep(3)
- drone.move(-115, 0, 93)
- sleep(15)
- drone.move(0, -27, 0)
- sleep(3)
- drone.setLightColor(0x00ff2b)
- sleep(20)
- drone.move(0, 27, 0)
- sleep(3)
- drone.move(115, 0, -93)
- sleep(15)
- drone.move(0, -23, 0)
- sleep(25)
- end
- end
- while true do
- local result,reason=pcall(function()
- local result,reason=receive()
- if not result then return respond() end
- respond(result())
- end)
- if not result then respond() end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement