--[[
local chat_messages = {
   'A chat message will be randomly selected from this table.',
   'There can be any number of entries.',
   'The table needs to be in the same file as the function is called from.'
}
Colorstrings for different messages:
Inspection: #28b928 Messages should be contained with []
Radio Replies: #49adff Message should be contained with {}
On Take Replies: #ff0000 Message should be contained with <>
On Use Replies: #cb00be Message should be contained with ||


minetest.chat_send_player(name, (minetest.colorize(color_name/string, rob_opr_base.random_chat(chat_messages)))

]]


function rob_opr_base.random_chat(table)
   local msg_count = #(table)
   local key = math.random(1, msg_count)
   local message = table[key]
   return message
end
