Thanks, and sorry for the sloppiness. I've changed the table around and I think I've got almost everything I wanted.
enemy_list = {
{warrior = {"Nick","Shaun"}},
{druid = {"Tom","Steve"}},
}
For the highlights alias it's just adding a few more lines:
DeleteTriggerGroup("Enemy Highlights")
for i,v in ipairs( enemy_list ) do
for i,v in pairs ( v ) do
for i,v in ipairs ( v ) do
require "addxml"
addxml.trigger { match = v,
regexp = true,
['repeat'] = true, -- repeat is lua kw
send = "",
sequence = 100,
name = v,
enabled = true,
custom_colour = 8,
keep_evaluating = true,
group = "Highlights Test",
}
end -- for
end -- for
end -- for
ColourNote("white", "red", "enemy highlights updated")
--
This is also the same way I iterate through the table to get the names for the PKscript and it is working well as far as I can see from the testing I've done.
--
However, I'm stuck on this thing:
enemy_list = {
{warrior = {"Nick","Shaun"}},
{druid = {"Tom","Steve"}},
}
who_check = {}
who_check.Tom = true
who_check.Burgandy = true
for i,v in ipairs( enemy_list ) do
for i,v in pairs ( v ) do
for i,v in ipairs ( v ) do
if who_check [v] then
print ( v )
end
end
end
end
This will return Tom, and I'm trying to get the class of Tom here as well so that it returns Tom(druid), for example. Can I do this here?
*edit* also this isn't how i typed this post with everything starting at the margin. not sure why it's like that
|