here's an idea... how about assigning a new flag field to char_data or pcdata 
for quests, making some things like:

#define QUEST1   A
#define QUEST2   B
 
etc... and making a table to reference between a test name "quest1" and the 
flag bit for it QUEST1, and then in your master text file, just label each 
quest with its name "quest1", and put all the details below... then the code 
can just check the player's quest flags and if IS_SET, it knows they've done 
that quest already, and it only takes up 1 line in their pfile, and no lines in 
the master file to determine who's completed it and who hasn't...
 
wavewvae
Richard Lindsey.

        -----Original Message----- 
        From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
        Sent: Wed 6/9/2004 10:29 PM 
        To: [email protected] 
        Cc: 
        Subject: Quest and files
        
        

        I am going to write my own custom quest code and I was wondering how I 
could
        easily keep track of the quests that players have done. I've decided 
that it
        would be the best way to have a master file that contains all the 
quests done
        by a player. In this file would be a listing of the player name and the 
quest
        number they've completed. When a quest is requested, the file will be 
checked
        and if they are not in the file they can do the quest, but if they are 
then
        they cannot.
        
        I am not exactly sure how efficent this will be, or if it'll cause 
problems.
        I don't want to have players become HUGE from the sheer amount of 
quests that we
        will be adding in, so I was thinking we can condense it into 1 master 
file.
        
        Another option I suppose would be to have a secondary quest file, based 
on the
        player's name and it won't clutter up the player file.
        
        Or something else that you guys could suggest.
        
        Thanks.
        
        PS: When I write code I try to write in a way that I will learn 
something. As of
        right now I suck at file I/O in C so this will be a great learning 
experience.
        It does have a reason why I am doing it besides what I've said in my 
previous
        paragraphs. Thanks again!
        
        
        
        --
        ROM mailing list
        [email protected]
        http://www.rom.org/cgi-bin/mailman/listinfo/rom
        

Reply via email to