Hey,
What we've decided to do on our MUD is to have a 'guild' system (NPC run) in which you are required to have certain pre-requisites to join. Upon joining you'll be presented with skills or spells, as well as facilities (healer, etc).
Now, what i'm trying to figure out, is the best way to code a 'pre-requisite' system in. Here's what i've got so far:
struct clan_type
{
long flags; /* flags for guild */
char *name; /* name of guild */
char *who_name; /* name sent for 'who' command */
....
int req1; /* Requirement 1 [Gold] */
int req2; /* Requirement 2 [Class] */
int req3; /* Requirement 3 [Alignment ] */
};
So, the idea would be that if req1 is set to anything other than 0, that's the gold requirement for the guild. If req3 is 0, there's no alignment requirement, whereas if it's 1 the requirement is good and if it's 2 the requirement is evil.
Here's my problem though - Classes can't really be number based. I mean, sure, I could make it so that 1 = warrior, 2 = cleric, etc.. But there must be a better/more efficient/easier way to do this..?
Also, if anyone has a better idea of the way requirements could be handled, that'd be greatly appreciated, too.
Cheers!
Xael