Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[Retaliation Computer]]--
- --[[By: Andrew2070]]--
- --[[Main Settings]]--
- local armed = true
- --[[Initialization]]--
- local silos, curSilo = {}, 1
- peripheral.find("modem", rednet.open)
- term.setBackgroundColor(colors.blue)
- local masterID
- --[[Main Functions]]--
- local function clear()
- term.clear()
- term.setCursorPos(1, 1)
- end
- --[[Main Program]]--
- while true do
- print("Waiting For A Retaliation Message From Server")
- id, msg, distance = rednet.receive(masterID)
- if (msg == "Retaliate") then
- print(" master=", id)
- masterID = id;
- rednet.send(masterID, "RetaliationCheck")
- elseif type(msg2) == "table" and id == masterID then
- if type(msg2.x) == "number" and type(msg2.y) == "number" and type(msg2.z) == "number" then
- print(" Retaliating At x=" .. msg2.x .. ", y=" .. msg2.y .. ", z=" .. msg2.z)
- icbm.setTarget(msg2.x, msg2.y, msg2.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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement