trigger pattern: return not isPrompt() <- lua function typeYou will need to watch for case-sensitive things, so string.lower(word) and string.title(word) functions come in handy there.
-- highlighting enemies
enemies_table = enemies_table or {}
for _,name in pairs(enemies_table) do if line:find(name) then selectString(name, 1) fg("red") resetFormat() end end
-- similar for basic target
target = target or "weevil"
if line:find(target) then selectString(target, 1) fg("yellow") resetFormat() end
if line:find(name) and target ~= name then selectString(name, 1) fg("red") resetFormat() end
Answers
Forgiveness is the fragrance that the violet sheds on the heel that has crushed it.
allies_table = allies_table or {}
for _,name in pairs(allies_table) do
if line:find(name) and target ~= name then selectString(name, 1) fg("purple") resetFormat() end
end
enemies_table = enemies_table or {}
for _,name in pairs(enemies_table) do
if line:find(name) and target ~= name then selectString(name, 1) fg("yellow") resetFormat() end
end
The problem is that, for some reason, either all the names are yellow or all the names are purple. Also, once I clear either list, the other list is suddenly highlighted that color (if I empty the purple enemies table, suddenly my yellow allies turn purple).
I'm so bad at this.