On Wed, 10 Jul 1996, Carlos Rodriguez wrote: > > I found there is a small error in act.wizard.c > > When you degrade someone, he is supossed to get the message "You > feel somewhat diminished". However, it is you who receive the message. > To correct this, find these lines in act.wizard.c, in do_advance: > > * send_to_char("You are momentarily enveloped by darkness!\r\n" > * "You feel somewhat diminished.\r\n", ch); > > and change them to: > > * act("You are momentarily enveloped by darkness!\r\n" > * "You feel somewhat diminished.\r\n", FALSE, ch, 0, victim, TO_VICT); > Actually.. All you really got to do, is change 'ch' in the send_to_char with 'victim' .. Much easier than using act() since it is a simple text message. > By the way, I'm trying to do a 'whogroup' command that would show which > characters are grouped and who is the leader of each group. However, I > don't know how can I manipulate the k->followers and k->master variables > to show me all the groups in the MUD. Any ideas? Here is how I would do it: ACMD(do_whogroup) { extern struct descriptor_data *descriptor_list; struct descriptor_data *d; struct follow_type *f, *next; strcpy(buf, "\0"); /* "clear" our buf string */ /* Check all descriptors in game. */ for(d = descriptor_list; d; d = d->next) { /* Does descriptor have a character and is it PLAYING and got followers but no master [No master == Must be a master] */ if(d->character && !STATE(d) && d->character->followers && !d->character->master) { /* Lets get the name of the master and add it to our buf string */ strcpy(buf1, "%s is followed by:\n\r", GET_NAME(d->character)); strcat(buf, buf1); /* Check who is following */ for(f = d->character->followers; f; f = next) { next = f->next; /* Add the followers name to our buf string */ strcpy(buf1, "%s%s", GET_NAME(f->follower), (!next ? "\n\r" : ", ")); strcat(buf, buf1); } /* Give us an empty line */ strcat(buf, "\n\r"); } } /* Send it to the user of the command. Could ofcoz use the pager too: page_string(ch->desc, buf, 1); */ send_to_char(buf, ch); } Hope this works for you :) --- Erik Niese-Petersen Aka Quint the Typo God Realms of Darkness IMP [matrix.xiii.com 6666. Playertesting]
This archive was generated by hypermail 2b30 : 12/07/00 PST