Hi. I'm very new to this. Just in my second week of learning Lua (and programming in general) and I'm trying to create a combat system for the MUD, Aetolia.
Say I'd like to create a table, called "herb_affs", that stores afflictions (various ailments, etc that my character can receive which could lead to his death) along with their corresponding cures, and have in that table a list of all known afflictions in Aetolia that are curable by herbs.
I'd like for this list to be prioritized, first off.
e.g.
herb_affs = {}
herb_affs.paralysis = bloodroot
herb_affs.stupidity = goldenseal
I'd want my system to cure paralysis before stupidity.
Also, how would I go about making a stringlist of the afflictions my character currently possesses?
How would I go about removing items from that stringlist?
How would I go about adding items to it?
I know I'm asking a bit, so thanks in advance to anyone kind enough to post a reply.
Say I'd like to create a table, called "herb_affs", that stores afflictions (various ailments, etc that my character can receive which could lead to his death) along with their corresponding cures, and have in that table a list of all known afflictions in Aetolia that are curable by herbs.
I'd like for this list to be prioritized, first off.
e.g.
herb_affs = {}
herb_affs.paralysis = bloodroot
herb_affs.stupidity = goldenseal
I'd want my system to cure paralysis before stupidity.
Also, how would I go about making a stringlist of the afflictions my character currently possesses?
How would I go about removing items from that stringlist?
How would I go about adding items to it?
I know I'm asking a bit, so thanks in advance to anyone kind enough to post a reply.