Implementation
==============

There are three types of guilds supported with this guild shadow, occupational,
layman and race guilds. Each type has it's own guild shadow file to inherit.
Occuptaional guild shadows shall inherit guild_occ_sh.c, layman guild_lay_sh.c
and races inherit guild_race_sh. These files all inherit guild_base.c. The base
shadow contains the functions that are common for these types of guilds. Each
specialized guild shadow contains the functions that need to differ.

Most of these functions are nomask and not for you to change but there are
three functions you would most likely want to change, query_guild_tax_occ(),
query_guild_not_allow_join_occ() and query_guild_keep_player() as they are
called in an occupational guild. The first should return the tax the player
should pay to the guild, initially, and the second function will be called
when a new guild shadow tries to shadow the player. The function will be
called with the type of guild, style of it and the name of the guild. If the
function return 1 we don't allow the player to join that guild. The last
function will be called each time the shadows autoloads. You can then check
if the player is still to consider a member of your guild, i.e. players can
change race when they die. As it is now, the shadows autoloads when a player
enters the game, or when he is moved from the death room to the 'body shop'
and after the player has selected a new body. Thus it is easy for a race
guild to check if the player changed race...

Type of guild is 'occupational', 'layman' or 'race'. Style is harder to define
but I suggest that we try to describe the guild as 'fighter', 'magic', 'cleric'
or 'thief' as long as possible. The name, well, that's up to you. NOTE: when
you redefine query_guild_not_allow_join_occ(s, s, s), remember to check if the
type of guild is the one you are, i.e. we don't want a player joining two 
occupational guilds. That check is made in the original so you could use :: and
test the result.

btw. Did I say that guild shadows were auto loading? If you make a change in
your guild shadow, be sure it loads properly, otherwise membership can be a
mess. When the guild shadows autoloads a test will be performed to see if all
those shadows can stand eachothers, if not, messages will be written and guild
shadows removed. So it is important that if you do a lot of testing in your
guild shadow if you allow other guilds, make sure you do all these test before
you let the player join your guild. Otherwise we'll get a strange situation and
possible errors when a player logs on and the shadows load.

Nick, the ever smiling wizard
