blob: 883b82fafb036432f48c6c623c369d3adcd55248 (
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 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
msg = msg .. " ".. generateRandomWord(math.random(1, 8))
end
LLChat.sendNearby(msg)
|