I'm not sure if that was an actual question but if so, something like:
Lua Code:
local msgList = {
{ "GUILD", "Message 1" },
{ "YELL", "Message 2" },
{ "PARTY", "Message 3" },
}
local function PrintList()
print("Help commands = /ph or /sph\nOption = Send - Message:")
for i=1, #msgList do
print(i, "=", msgList[i][1], "-", msgList[i][2])
end
end
SLASH_PHRASE1 = "/ph";
SLASH_PHRASE2 = "/sph";
SlashCmdList["PHRASE"] = function(msg)
if msg == "" then
PrintList()
else
local cmd = tonumber(msg)
if msgList[cmd] then
SendChatMessage(msgList[cmd][2], msgList[cmd][1])
else
print("Not a valid option")
end
end
end