summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/test_LLChat.lua
blob: 95bd218baa0c72cf0ad63991d57b137d5597e02a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
LLChat = require 'LLChat'

function generateRandomWord(length)
    local alphabet = "abcdefghijklmnopqrstuvwxyz"
    local word = ""
    for i = 1, length do
        local randomIndex = math.random(1, #alphabet)
        word = word .. alphabet:sub(randomIndex, randomIndex)
    end
    return word
end

local msg = ""
math.randomseed(os.time())
for i = 1, math.random(1, 10) do
    msg = msg .. " ".. generateRandomWord(math.random(1, 8))
end
LLChat.sendNearby(msg)