the game works is that it says "find words that begin with A and end with D"
for example, and people can guess whatever word, say "aided", they would get
5 points(points are determined by length of word, longer words=multipliers),
but now what if they said "aided" again, i dont want them, or anybody else
to be able to gain any more points off that word anymore until the next
round(each round is 1 minute long, on new round the first/last letters
change)
i dont think you quite get what im doing, i dont want to keep track of wrong
guesses or totalguesses(i removed totalguesses after posting) at all, since
i've been introduced to this is_exact_name, which does exactly what i want,
it just doest seem to be working properly for me, or im not using it
properly.
im my last post i posted how its showing wordtwist.word and wordtwist.name
as one when i logged only wordtwist.word, thats my main problem right now,
the prefix thing before was remedied by just removing prefixxes altogether,
i dont much care for it anyway.
i want to keep track of .word and .name so at the end of the round it can
sort through all the guesses and say which had the most points and who
guessed it( also, and most importantly so people cant cheat by guessing the
same word multple times)
forgive me if you did understand what i was saying and im just not following
you
From: Jeremy Hill <[EMAIL PROTECTED]>
To: [email protected]
Subject: Re: a problem with checking if a word has been entered already
Date: Sat, 21 Aug 2004 23:51:27 -0500
I wasn't able to use the fengshui thing with MSN, but I think I grasp what
you are aiming for.
But why do you want to keep track of wrong guesses or total guesses for?
Does it decide how many points are distributed? If you aren't interested
in the actual strings of the wrong guesses, the problem becomes much
simpler.
Here'd be the struct for just the above, not including round stuff:
struct wordtwist
{
int guesses;
char first;
char last;
char *word; };
Then as people guess wrong, just increment totalguesses by 1:
void wt_check_word (CHAR_DATA *ch, char *argument)
{
if (!ch || !argument || argument[0] == '\0')
return;
if (!str_cmp(argument, wordtwist.word))
{
//blahblah ch wins points!
wt_reset();
}
else
wordtwist.guesses++;
}
If you are additionally concerned with how many times a single person
guesses for point purposes, It may actually be easier to add a variable to
the 'pc_data' or 'char_data' struct:
struct pc_data
{
PC_DATA * next;
BUFFER * buffer;
COLOUR_DATA * code; /* Data for color configuration */
bool valid;
...
int wt_guesses;
...
}
(I'd recommend setting wt_guesses to 0 in new_pcdata)
If you go this route, you could either brute-force and roll through the
players in the game and reset all their wt_guesses to 0 for the next round
(recommended, as a person can switch on the channel mid-round) or just set
to 0 those with the COMM_WTWIST channel currently turned on, eg:
void wt_reset (void)
{
DESCRIPTOR_DATA *d = NULL;
/*
*<new round stuff>
*/
...
for (d = descriptor_list; d != NULL; d = d->next)
{
if (d->character != NULL && d->connected == CON_PLAYING &&
IS_SET(d->character->comm, COMM_WTWIST))
{
d->character->pcdata->wt_guesses = 0;
} }
...
}
I may be missing some of the mechanics behind the game, though.
Tristan M wrote:
_________________________________________________________________
Scan and help eliminate destructive viruses from your inbound and outbound
e-mail and attachments.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Start enjoying all the benefits of MSNĀ® Premium right now and get the
first two months FREE*.