Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local par1 = ""
- local par2 = 0
- local par3 = ""
- local args = {...}
- function ServerSendResponse()
- while true do
- rednet.send(par2, par1)
- end
- end
- function ServerReceive()
- while true do
- id, mess = rednet.receive()
- if id == par2 then
- par3 = mess
- return
- end
- end
- end
- function Quarry(Count)
- par2, mess = rednet.receive()
- if mess == "quarry0808" then
- print("New quarry: "..par2)
- while par3 == "countplease" do
- par1 = "quarry0808"
- parallel.waitForAny(ServerSendResponse, ServerReceive)
- end
- rednet.send(id, count)
- end
- end
- rednet.open("top")
- if #args > 1 or #args < 1 then
- print("Invalid number of arguments.")
- else
- count = args[1]
- Quarry(count)
- end
- rednet.close("top")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement