Quest name: A Fun Quest
Quest goal: Kill the evil dragon
Successful Players: Fred,George,Bob
CompletedQuest1
CompletedQuest2
CompletedQuest3
…
CompletedQuest20
char buf[100];
size_t bytes_read = 0;
fp = open_the_file();
// don't read sizeof: leave one for the null char
while ( (bytes_read = fread(buf, sizeof(buf)-1, 1, fp) > 0 ) {
// set the last character to the null char
buf[bytes_read] = '\0';
send_to_char(ch, buf);
}
I want to create a command that can see what quests players have completed without logging into the shell. I haven't really looked for this yet as I'm at work right now, but how would I read from *name*.qdt and view it ingame? Would it have to do with fread or is that just for the pfiles and such?