I got this to work. but it's kind of clunky if these lists are going to change.
<triggers>
<trigger
enabled="y"
match="^(.*?) tells you '(.*?)'$"
omit_from_output="y"
regexp="y"
send_to="14"
sequence="90"
>
<send>
Administrators_Color = "white"
Clannies_Color = "magenta"
Allies_Color = "blue"
Friends_Color = "green"
Others_Color = "yellow"
Administrators = {
["Duende"] = true,
["Vassago"] = true,
["add name here"] = true,
}
Clannies = {
["Deacla"] = true,
["Tuck"] = true,
["add name here"] = true,
}
Allies = {
["Alyce"] = true,
["Deathsmasher"] = true,
["add name here"] = true,
}
Friends = {
["add friends name"] = true,
["add friends name"] = true,
["add friends name"] = true,
}
if Administrators["%1"] then
for _,v in ipairs(TriggerStyleRuns) do
ColourTell(Administrators_Color, RGBColourToName(v.backcolour), v.text)
end
elseif Clannies["%1"] then
for _,v in ipairs(TriggerStyleRuns) do
ColourTell(Clannies_Color, RGBColourToName(v.backcolour), v.text)
end
elseif Allies["%1"] then
for _,v in ipairs(TriggerStyleRuns) do
ColourTell(Allies_Color, RGBColourToName(v.backcolour), v.text)
end
elseif Friends["%1"] then
for _,v in ipairs(TriggerStyleRuns) do
ColourTell(Friends_Color, RGBColourToName(v.backcolour), v.text)
end
else
for _,v in ipairs(TriggerStyleRuns) do
ColourTell(Others_Color, RGBColourToName(v.backcolour), v.text)
end
end
Note() -- finish the line
</send>
</trigger>
</triggers>
it would be great if you could add a name to the tables with aliases like 'AddClannie Billy' would add Billy to the Clannie table until you used 'RemoveClannie Billy' to remove him , but i'm not that good yet.
|