diff options
author | Kitty Barnett <develop@catznip.com> | 2024-09-30 15:54:20 +0200 |
---|---|---|
committer | Kitty Barnett <develop@catznip.com> | 2024-09-30 15:54:20 +0200 |
commit | ed2d4f02d93459bf114ebeab8727d507b7bfc0ef (patch) | |
tree | a216907e2c01db7932c83e212319cb7a8c790013 /indra/newview/scripts/lua/test_LLChat.lua | |
parent | a8d8314cb9af193ea7ce95456fb308217ba28e3c (diff) | |
parent | a409503653bebacbc498409806f9e1a4b97ed6ac (diff) |
Merge branch 'develop' into rlva/base
Diffstat (limited to 'indra/newview/scripts/lua/test_LLChat.lua')
-rw-r--r-- | indra/newview/scripts/lua/test_LLChat.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/test_LLChat.lua b/indra/newview/scripts/lua/test_LLChat.lua new file mode 100644 index 0000000000..3abaf28e42 --- /dev/null +++ b/indra/newview/scripts/lua/test_LLChat.lua @@ -0,0 +1,18 @@ +LLChat = require 'LLChat' + +function generateRandomWord(length) + local alphabet = "abcdefghijklmnopqrstuvwxyz" + local wordTable = {} + for i = 1, length do + local randomIndex = math.random(1, #alphabet) + table.insert(wordTable, alphabet:sub(randomIndex, randomIndex)) + end + return table.concat(wordTable) +end + +local msg = {'AI says:'} +math.randomseed(os.time()) +for i = 1, math.random(1, 10) do + table.insert(msg, generateRandomWord(math.random(1, 8))) +end +LLChat.sendNearby(table.concat(msg, ' ')) |