Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Network Drone
- --For OC
- --Kirara Hardcore Black Team
- --test version not for relese
- local function proxyFor(name, required)
- local address = component and component.list(name)()
- if not address and required then
- error("missing component '" .. name .. "'")
- end
- return address and component.proxy(address) or nil
- end
- local drone = proxyFor("drone", true)
- local eeprom = proxyFor("eeprom", true)
- -- Colors used to indicate different states of operation.
- local colorCharing = 0xFF0000
- local colorSearching = 0xFF0000
- local colorDelivering = 0x0000FF
- local i = 1
- local data = nil
- while true do
- data = eeprom.getData()
- drone.setStatusText(tostring(data))
- computer.pullSignal(2)
- i = i + 1
- if data ~= nil then
- drone.setLightColor(colorSearching)
- data = tostring(i+tonumber(data))
- eeprom.setData(data)
- else
- drone.setLightColor(colorDelivering)
- data = tostring(i)
- eeprom.setData(data)
- end
- drone.setStatusText(i.." | "..data)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement