View difference between Paste ID: sAgqt4Ba and vETWGBZL
SHOW: | | - or go back to the newest paste.
1-
local m = peripheral.find "modem"
1+
local m = peripheral.find("modem", function(name, obj) return obj.isWireless() end)
2
3
local function randbytes(len)
4
    local out = ""
5-
        {
5+
    for i = 1, len do
6-
            sType = "login",
6+
        out = out .. string.char(math.random(1, 255))
7-
            nUserID = math.random(0, math.huge),
7+
    end
8-
            sUsername = randbytes(16)
8+
    return out
9
end
10-
    sleep(0.5)
10+
11
while true do
12
    m.transmit(rednet.CHANNEL_BROADCAST, rednet.CHANNEL_BROADCAST,
13
		{
14
			sProtocol = "chat",
15
			nRecipient = rednet.CHANNEL_BROADCAST,
16
			nMessageID = math.random(0, 1313131),
17
        	message = {
18
            	sType = "login",
19
	            nUserID = math.random(0, 1313131),
20
    	        sUsername = randbytes(16)
21
			}
22
        })
23
    sleep(0.4)
24
end