What I'm trying to do is update the script I am using for pvp on the mud that I play. Right now, the way I do it is I have all "enemy" names in 1 table and if a person listed in this table flies in/arrives/is standing here etc, pk script will fire. That's worked well so far but now I want to make it more manageable with character classes. I want to know if I can create tables within this original table and still have priorities work, which in lua depends on which value is first in the table.
For example:
Right now what I use is:
enemy_list = {"Shaun","Nick","ReallyCurious","Onoitsu"}
What I am trying to do:
enemy_list = {}
enemy_list.warriors = {"Nick","ReallyCurious","Onoitsu"}
enemy_list.necromancers = {"Shaun"}
etc
This way it'd be easier to maintain and update and also, I want to use this same table as a better who_list analyzer which tells to our guild channel all enemy characters and their class when I type who.
For example:
Right now what I use is:
enemy_list = {"Shaun","Nick","ReallyCurious","Onoitsu"}
What I am trying to do:
enemy_list = {}
enemy_list.warriors = {"Nick","ReallyCurious","Onoitsu"}
enemy_list.necromancers = {"Shaun"}
etc
This way it'd be easier to maintain and update and also, I want to use this same table as a better who_list analyzer which tells to our guild channel all enemy characters and their class when I type who.