I use a linked list and a guild data file.

gods.gld~
Guild Gods~
Patron Ao~
Rank    1       Chosen One~
Rank    2       Demigod~
Rank    3       Lesser God~
Rank    4       Lesser God~
Rank    5       Intermediate God~
Rank    6       Intermediate God~
Rank    7       Greater God~
Rank    8       Greater God~
Rank    9       Supreme God~
Rank    10      Uber God~
Bank    0  0  0  0
Fee 0
ML      0  0  0  0
Flag 0


Member  Savras~ 0 1356
Member  Rillifane~ 0 1356
Member  Mask~ 6 1356
Member  Ao~ 9 1356
Member  Talos~ 0 1357
Member  Lloth~ 4 1357
Member  Cyric~ 6 1357
Member  Tyr~ 6 1357
Member  Istishia~ 0 1357
Member  ~ 6 1357
Member  Corellon~ 0 1357

End

Yes, it's based on gary's clan code. You can see how it's used in a order script i released, same thing but does orders instead of clans for religion. at Kyndig do a search for ORDER / DEITY by Muerte


From: "Dale Kingston" <[EMAIL PROTECTED]>
To: "ROM" <[email protected]>
Subject: Re: Clan roster
Date: Sun, 28 Jul 2002 15:16:53 -0600

As far as looping through the pfiles that's not to hard just read up on how
to use scan dir and if you need some help with that i can show you some
examples of how i use it. and as for your second one here is what i use for
my tribe list. it was originally a snippet for a wizlist that auto updated
it self as you made or deimm immortals I reworked it to work for the clans.
Here's some small things to help with it, in do_delete add this around where you unlink the pfile update_tribelist(ch, 0, 0, 0, 0); that will remove
them if they delete.



And where you have it so they are promoted guilded use
update_tribelist(victim, victim->rank, victim->clan, current_time,
victim->level);

and for deguilding use the one for deleting, should make your life a little
easier, also the command allows for you to add people using the do_tribelist
it's something only an imp can do but it helps to edit the list incase
something weird happens or for manually adding people, you can also in
comm.c add that update_tribelist(victim, victim->rank, victim->clan,
current_time, victim->level); and have it add them as they log on to maybe
save you some time. Attached to the email is my c file of the code if you
have any problems with it email me [EMAIL PROTECTED] and i'll try to help ya
out with it.



Sarix

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, July 28, 2002 7:32 AM
Subject: Clan roster


> Ok, I'm looking to make a clan roster command that will show all the
members
> of a clan and their ranks.  I'm thinking that when I first implement the
> command, it should search through all the pfiles and write the names/ranks
to
> a data file for each clan, then every time someone is guilded or promoted,
it
> should add or modify the information in the data files.  Then I want a
> command that will display the stored info for a given clan.  The only
things
> I don't know how to do:
>
> 1) Cycle through the pfiles (I know how to load the clan data from each
> pfile, just not    how to cycle through them all)
> 2) Save and Load Data to and from a clan data file.
>
> If anyone could give me some idea as to how these things can be
accomplished,
> I'd greatly appreciate it.


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx


Reply via email to