I've started writing my own piece of code to take the output of the elist2 and turn it into a table displaying how many sips of each type of elixer and salve I have. So far I've successfully gotten it to capture and suppress the normal output of elist2 while creating a table 'vials' that has entries that look like this:
Code: Select all
'333606': table {
'elixer': 'an elixir of mana'
'sips': '121'
'decay': '66'
}
Also, it prints out the following to act as the header for the new table I want to create:
Code: Select all
Elixer/Salve Number of Sips
-----------------------------------------------------
Finally, the trigger is enabled/disabled when it should be and doesn't capture more lines than it should.
My question is this - how can I take my 'vials' table and turn it into an 'elixers' table which has entries that look like
723, in this example, is the total number of sips left in vials that contain mana elixer.
I then wanna print those into the table as shown above:
Code: Select all
Elixer/Salve Number of Sips
-----------------------------------------------------
"an elixer of mana" 723
I figure I need to use "for" to do this somehow, but I have never successfully used "for", nor have I found any documentation that really lets me understand the correct syntax. Also, if there's some elegant way for me to make it say "Mana" instead of "an elixer of mana" I would want to do that, but that is far less important than the rest.
Sorry for the long winded post! Anybody have any helpful hints?