--Silo Launch PC, [working] [By Andrew2060] --[[Settings]]-- local icbmSide = "back" local armed = true --set armed to false to disarm silo. --[[Init]]-- local icbm = peripheral.wrap(icbmSide) local masterID peripheral.find("modem", rednet.open) --[[Functions]]-- local function clear() term.clear() term.setCursorPos(1, 1) end --[[Main program]]-- clear() while true do print("Waiting for Threat Message") id, msg, distance = rednet.receive(masterID) if (msg == "ABM1") then print(" master=", id) masterID = id; rednet.send(masterID, "ABM") elseif type(msg) == "table" and id == masterID then if type(msg.x) == "number" and type(msg.y) == "number" and type(msg.z) == "number" then print(" launching CounterMeasures At x=" .. msg.x .. ", y=" .. msg.y .. ", z=" .. msg.z) icbm.setTarget(msg.x, msg.y, msg.z) if (armed) then peripheral.call("back","launch") end else print(" invalid table command") end else print(" invalid msg '", msg, "' from '", id, "', distance=", distance) end end