22 Nov, 2013, Grieffels wrote in the 1st comment:
Votes: 0
So i've been trying to figure out how to have my wholist show people as online during CON_NOTE_ and so forth. I'm managed to not be able too do so.

I've found bits of the code where it has != CON_PLAYING, with d->connected and such, tinkered with that but I still can't get them to show up while in another CON_ other than playing. Can someone help me out with this?
22 Nov, 2013, Zeno wrote in the 2nd comment:
Votes: 0
Can you show the loop where it displays players online?
22 Nov, 2013, Grieffels wrote in the 3rd comment:
Votes: 0
I'm at work currently so it would be a bit hard to type it all out. If you could refer to a stock
QuickMUD wholist that would be fine also. They have the same concept, except for the seperation
portion of players and staff members. I know im the one asking for help so I should be giving more
information, it's just hard to as I am at work on two different computers. This one has no more usb drives
and the other one doesn't have access to the web, only directly through putty and GMUD because I bring my
own hard drive.
22 Nov, 2013, Grieffels wrote in the 4th comment:
Votes: 0
This is a basic version of do_who from QuickMUD. Mine is modified but this one does the same thing and doesn't allow characters that are out of CON_PLAYING and in things like CON_NOTE_TO, CON_NOTE_SUBJECT, CON_NOTE_EXPIRE, etc to show on the who list. Where is it stopping this at? I've added this stuff to != CON_PLAYING && != CON_NOTE_TO etc..trying to see where but I just can't seem to get it to work correctly.

* Now show matching chars.
nMatch = 0;
buf[0] = '\0';
output = new_buf ();
for (d = descriptor_list; d != NULL; d = d->next)
char const *class;
* Check for match against restrictions.
* Don't use trust as that exposes trusted mortals.
if (d->connected != CON_PLAYING || !can_see (ch, d->character))
wch = (d->original != NULL) ? d->original : d->character;
if (!can_see (ch, wch))
if (wch->level < iLevelLower
|| wch->level > iLevelUpper
|| (fImmortalOnly && wch->level < LEVEL_IMMORTAL)
|| (fClassRestrict && !rgfClass[wch->class])
|| (fRaceRestrict && !rgfRace[wch->race])
|| (fClan && !is_clan (wch))
|| (fClanRestrict && !rgfClan[wch->clan]))
* Figure out what to print for class.
class = class_table[wch->class].who_name;
switch (wch->level)
case MAX_LEVEL - 0:
class = "IMP";
case MAX_LEVEL - 1:
class = "CRE";
case MAX_LEVEL - 2:
class = "SUP";
case MAX_LEVEL - 3:
class = "DEI";
case MAX_LEVEL - 4:
class = "GOD";
case MAX_LEVEL - 5:
class = "IMM";
case MAX_LEVEL - 6:
class = "DEM";
case MAX_LEVEL - 7:
class = "ANG";
case MAX_LEVEL - 8:
class = "AVA";
* Format it up.
sprintf (buf, "[%2d %6s %s] %s%s%s%s%s%s%s%s\n\r",
wch->race < MAX_PC_RACE ? pc_race_table[wch->race].who_name
: " ",
wch->incog_level >= LEVEL_HERO ? "(Incog) " : "",
wch->invis_level >= LEVEL_HERO ? "(Wizi) " : "",
IS_SET (wch->comm, COMM_AFK) ? "[AFK] " : "",
IS_SET (wch->act, PLR_KILLER) ? "(KILLER) " : "",
IS_SET (wch->act, PLR_THIEF) ? "(THIEF) " : "",
wch->name, IS_NPC (wch) ? "" : wch->pcdata->title);
add_buf (output, buf);
sprintf (buf2, "\n\rPlayers found: %d\n\r", nMatch);
add_buf (output, buf2);
page_to_char (buf_string (output), ch);
free_buf (output);
22 Nov, 2013, Nathan wrote in the 5th comment:
Votes: 0
Well, as you are probably aware, 'continue' skips to the next loop iteration (i.e. skips the resent of the current iteration). Based on that detail and the following line:

if (d->connected != CON_PLAYING || !can_see (ch, d->character))

If d->connected (I take this to be connection status) isn't CON_PLAYING OR they can't be seen, then they don't show up in the list because the loops skips to the next iteration. I'm not entirely what can_see(…) does except that presumably it takes to character (CHAR_DATA) pointers. Any time can_see (ch, d->character) returns false then the loop won't execute that statement, presumably because you can't see them.
22 Nov, 2013, Skol wrote in the 6th comment:
Votes: 0
Like Nathan pointed out, that's the one.
Try d->connected > CON_PLAYING (as the note ones are higher #'s that CON_PLAYING), this way you allow for playing AND higher connection states (notes etc).

Best of luck, if that doesn't work, post your CON_ defines from merc.h and I can help more.

- Dave.
22 Nov, 2013, Grieffels wrote in the 7th comment:
Votes: 0
As to what everyone said, I appriciate it a lot. I have however tried that and for whatever reason it will just NOT show anyone. I've tried making it only shows people for != CON_NOTE_TO etc, to see if it would show that way and still nothing. So here is the next attempt. :lol:

#define CON_PLAYING 15
—-There are defines between them, but I figure you knowing the numbers of what we are working with will help enough. If more information is needed, let me know.
#define CON_NOTE_TO 20
#define CON_NOTE_EXPIRE 22
#define CON_NOTE_TEXT 23
#define CON_NOTE_FINISH 24
23 Nov, 2013, Skol wrote in the 8th comment:
Votes: 0
What's CON_PLAYING set to?
That's your key # right there, what you need to do is make sure that if they're above the creation/connecting #'s, then they can be seen. To do that, you're saying if their connected state is a higher #, they show up. If your CON_NOTE_TO etc is lower than the CON_PLAYING, then you need to start with those instead.
An issue with the other note system is just this though, stock ROM didn't use those, as such your connection state didn't change as you wrote a note (It simply had fields that stored the info ie ch->pNoteto->title (or such, thinking outloud).
23 Nov, 2013, Grieffels wrote in the 9th comment:
Votes: 0
Ok so what I did was move my #define CON_ list around. I moved CON_PLAYING just before the CON_NOTE stuff and made those the last CON's in the defines.
So it's #define CON_PLAYING through #define CON_NOTE_FINISH.

In do_who I made it so (d->connected != CON_PLAYING etc..) turned into (d->connected < CON_PLAYING). I added the flag for who by using
wch->desc->connected >= CON_NOTE_TO ? "(Note)" : "", and adding the %s (string) to the above line that prints the information.

After fixing more things like this and making these adjustments, I will probably go back, edit a QuickMUD or even a RaM with some additions.
For starters, adding object and room programs, making it so people are listed on who while in the CON_NOTE states, and some other things
which will take me time to think about what they really need or would entice people to want to use as the starting base.

Again, thanks for the help everyone.