Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ do_who
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
3
4
| Posted by
| Ithildin
USA (262 posts) Bio
|
| Date
| Thu 25 Mar 2004 04:51 AM (UTC) Amended on Thu 25 Mar 2004 04:54 AM (UTC) by Ithildin
|
| Message
| I am completely redoing my who list. i searched this site for some help but it seemed like everyone else had the same problem and didn't say if they fixed it or not. so here i go as well. what i'm wanting it this:
[---------------------Immortals--------------------]
[Supreme Intity ] Ithildin ]
[--------------------------------------------------]
[---------------------Mortals----------------------]
[ 10 Cleric ] Player ]
[ 15 Ranger ] Player ]
[ 28 Mage ] Player ]
[--------------------------------------------------]
You see 3 players in the game.
The high players this reboot was 25.
here's what i have so far code wise:
void do_who( CHAR_DATA *ch, char *argument )
{
char buf[MAX_STRING_LENGTH];
// char clan_name[MAX_INPUT_LENGTH];
char invis_str[MAX_INPUT_LENGTH];
char char_name[MAX_INPUT_LENGTH];
char class_text[MAX_INPUT_LENGTH];
DESCRIPTOR_DATA *d;
int iClass, iRace;
int iLevelLower;
int iLevelUpper;
int nNumber;
int nMatch;
bool rgfClass[MAX_CLASS];
bool rgfRace[MAX_RACE];
bool fImmortalOnly;
//CLAN_DATA *pClan = NULL;
FILE *whoout = NULL;
iLevelLower = 0;
iLevelUpper = MAX_LEVEL;
fImmortalOnly = FALSE;
WHO_DATA *cur_who = NULL;
WHO_DATA *next_who = NULL;
WHO_DATA *first_mortal = NULL;
WHO_DATA *first_imm = NULL;
for ( iClass = 0; iClass < MAX_CLASS; iClass++ )
rgfClass[iClass] = FALSE;
for ( iRace = 0; iRace < MAX_RACE; iRace++ )
rgfRace[iRace] = FALSE;
nNumber = 0;
for ( ;; )
{
char arg[MAX_STRING_LENGTH];
argument = one_argument( argument, arg );
if ( arg[0] == '\0' )
break;
if ( is_number( arg ) )
{
switch ( ++nNumber )
{
case 1: iLevelLower = atoi( arg ); break;
case 2: iLevelUpper = atoi( arg ); break;
default:
send_to_char( "Only two level numbers allowed.\n\r", ch );
return;
}
}
else
{
if ( strlen(arg) < 3 )
{
send_to_char( "Arguments must be longer than that.\n\r", ch );
return;
}
CHAR_DATA *wch;
char const *class;
if ( (d->connected != CON_PLAYING && d->connected != CON_EDITING)
|| !can_see( ch, d->character ) || d->original)
continue;
wch = d->original ? d->original : d->character;
strcpy( char_name, wch->name );
sprintf( class_text, "%s%2d %s", NOT_AUTHED(wch) ? "" : "", wch->level, class_table[wch->class]->who_name );
class = class_text;
/*sprintf( class_text, "&w[&W%s &c%s&w]", wch->level, class_table[wch->class]->who_name );
class = class_text;*/
switch ( wch->level )
{
default: break;
case MAX_LEVEL - 0: class = "&W&cSu&Cp&Br&ceme Entity&Y&W"; break;
case MAX_LEVEL - 1: class = "&W&CInfinite&Y&W "; break;
case MAX_LEVEL - 2: class = "&W&pEternal&Y&W "; break;
case MAX_LEVEL - 3: class = "&Y&WAncient "; break;
case MAX_LEVEL - 4: class = "&Y&WExalted God "; break;
case MAX_LEVEL - 5: class = "&Y&WAscendant God "; break;
case MAX_LEVEL - 6: class = "&Y&WGreater God "; break;
case MAX_LEVEL - 7: class = "&Y&WGod "; break;
case MAX_LEVEL - 8: class = "&Y&WLesser God "; break;
case MAX_LEVEL - 9: class = "&Y&WImmortal "; break;
case MAX_LEVEL - 10: class = "&Y&WDemi God "; break;
case MAX_LEVEL - 11: class = "&Y&WSavior "; break;
case MAX_LEVEL - 12: class = "&Y&WCreator "; break;
case MAX_LEVEL - 13: class = "&Y&WAcolyte "; break;
case MAX_LEVEL - 14: class = "&Y&WNeophyte "; break;
case MAX_LEVEL - 15: class = "&Y&WAvatar "; break;
}
if ( xIS_SET(wch->act, PLR_WIZINVIS) )
sprintf( invis_str, "(%d) ", wch->pcdata->wizinvis );
else
invis_str[0] = '\0';
CREATE( cur_who, WHO_DATA, 1 );
cur_who->text = str_dup( buf );
if ( wch->level > 100 && IS_IMMORTAL( wch ) )
cur_who->type = WT_IMM;
if ( first_imm )
{
if ( !ch )
fprintf( whoout, "&c\n\r[--------------------------------[ &WIMMORTALS&c ]----------------------------]\n\r\n\r" );
else
send_to_pager( "&c\n\r[-------------------------------[ &WIMMORTALS&c ]----------------------------]\n\r\n\r", ch );
}
for ( cur_who = first_imm; cur_who; cur_who = next_who )
{
if ( !ch )
fprintf( whoout, cur_who->text );
else
send_to_pager( cur_who->text, ch );
next_who = cur_who->next;
DISPOSE( cur_who->text );
DISPOSE( cur_who );
}
if ( first_mortal )
{
if ( !ch )
fprintf( whoout, "&c\n\r[-------------------------------[ &WADVENTURERS&c ]-------------------------]\n\r\n\r" );
else
send_to_pager( "&c\n\r[-------------------------------[ &WADVENTURERS&c ]--------------------------]\n\r\n\r", ch );
}
for ( cur_who = first_mortal; cur_who; cur_who = next_who )
{
if ( !ch )
fprintf( whoout, cur_who->text );
else
send_to_pager( cur_who->text, ch );
next_who = cur_who->next;
DISPOSE( cur_who->text );
DISPOSE( cur_who );
}
if ( !ch )
{
fprintf( whoout, "%d player%s.\n\r", nMatch, nMatch == 1 ? "" : "s" );
fclose( whoout );
return;
}
send_to_pager( "&w\n\r[------------------------------------------------------------------------]\n\r\n\r", ch );
set_char_color( AT_YELLOW, ch );
ch_printf( ch, "%d player%s.\n\r", nMatch, nMatch == 1 ? "" : "s" );
return;
}
Thanks
Ithildin
| | Top |
|
| Posted by
| Ithildin
USA (262 posts) Bio
|
| Date
| Reply #1 on Thu 25 Mar 2004 04:52 AM (UTC) |
| Message
| i couldn't finish my last post without going over limit
here's my error
the only error i'm getting is this:
act_info.c: In function `do_who':
act_info.c:4409: error: syntax error at end of input
make[1]: *** [act_info.o] Error 1
at the end of my file is the error. i'm not sure why that's not working. any thoughts? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #2 on Thu 25 Mar 2004 05:58 AM (UTC) |
| Message
| | You have too many { symbols in the function (or not enough } symbols). I haven't looked at which one it is, but you can use MUSHclient's "find matching brace" function (or the same thing in vi) to match your braces. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Ithildin
USA (262 posts) Bio
|
| Date
| Reply #3 on Fri 26 Mar 2004 06:14 AM (UTC) Amended on Fri 26 Mar 2004 06:41 AM (UTC) by Ithildin
|
| Message
| ok, here's what i got. it all compiles fine, but slight problem. here's the code:
void do_who( CHAR_DATA *ch, char *argument )
{
DESCRIPTOR_DATA *d;
char buf [ MAX_STRING_LENGTH*3 ];
char buf2 [ MAX_STRING_LENGTH ];
int iClass;
int iLevelLower;
int iLevelUpper;
int nNumber;
int nMatch;
bool rgfClass [ MAX_CLASS ];
bool fClassRestrict;
bool fImmortalOnly;
/*
* Set default arguments.
*/
iLevelLower = 0;
iLevelUpper = MAX_LEVEL; /*Used to be Max_level */
fClassRestrict = FALSE;
fImmortalOnly = FALSE;
for ( iClass = 0; iClass < MAX_CLASS; iClass++ )
rgfClass[iClass] = FALSE;
/*
* Parse arguments.
*/
nNumber = 0;
for ( ;; )
{
char arg [ MAX_STRING_LENGTH ];
argument = one_argument( argument, arg );
if ( arg[0] == '\0' )
break;
if ( is_number( arg ) )
{
switch ( ++nNumber )
{
case 1: iLevelLower = atoi( arg ); break;
case 2: iLevelUpper = atoi( arg ); break;
default:
send_to_char( "Only two level numbers allowed.\n\r", ch );
return;
}
}
else
{
int iClass;
if ( strlen( arg ) < 3 )
{
send_to_char( "Classes must be longer than that.\n\r", ch );
return;
}
/*
* Look for classes to turn on.
*/
arg[3] = '\0';
if ( !str_cmp( arg, "imm" ) )
{
fImmortalOnly = TRUE;
}
else
{
fClassRestrict = TRUE;
for ( iClass = 0; iClass < MAX_CLASS; iClass++ )
{
if ( !str_cmp( arg, class_table[iClass]->who_name ) )
{
rgfClass[iClass] = TRUE;
break;
}
}
if ( iClass == MAX_CLASS )
{
send_to_char( "That's not a class.\n\r", ch );
return;
}
}
}
}
/*
* Now show matching chars.
*/
nMatch = 0;
buf[0] = '\0';
for ( d = first_descriptor; d; d = d->next )
{
CHAR_DATA *wch;
char const *class;
wch = ( d->original ) ? d->original : d->character;
/*
* Check for match against restrictions.
* Don't use trust as that exposes trusted mortals.
*/
if ( d->connected != CON_PLAYING || !can_see( ch, wch ) )
continue;
if ( wch->level < iLevelLower
|| wch->level > iLevelUpper
|| ( fImmortalOnly && wch->level < LEVEL_HERO )
|| ( fClassRestrict && !rgfClass[wch->class] ) )
continue;
nMatch++;
/*
* Figure out what to print for class.
*/
class = class_table[wch->class]->who_name;
if ( wch->level >= (MAX_LEVEL -15) )
switch ( wch->level )
{
default: break;
case MAX_LEVEL - 0: class = "&W&cSu&Cp&Br&ceme Entity&Y&W"; break;
case MAX_LEVEL - 1: class = "&W&CInfinite&Y&W "; break;
case MAX_LEVEL - 2: class = "&W&pEternal&Y&W "; break;
case MAX_LEVEL - 3: class = "&Y&WAncient "; break;
case MAX_LEVEL - 4: class = "&Y&WExalted God "; break;
case MAX_LEVEL - 5: class = "&Y&WAscendant God "; break;
case MAX_LEVEL - 6: class = "&Y&WGreater God "; break;
case MAX_LEVEL - 7: class = "&Y&WGod "; break;
case MAX_LEVEL - 8: class = "&Y&WLesser God "; break;
case MAX_LEVEL - 9: class = "&Y&WImmortal "; break;
case MAX_LEVEL - 10: class = "&Y&WDemi God "; break;
case MAX_LEVEL - 11: class = "&Y&WSavior "; break;
case MAX_LEVEL - 12: class = "&Y&WCreator "; break;
case MAX_LEVEL - 13: class = "&Y&WAcolyte "; break;
case MAX_LEVEL - 14: class = "&Y&WNeophyte "; break;
case MAX_LEVEL - 15: class = "&Y&WAvatar "; break;
}
/*
* Format it up.
*/
if ( wch->level >= (MAX_LEVEL - 15) )
send_to_pager( "&w\n\r[------------------------------------------------------------------------]\n\r", ch ),
sprintf( buf + strlen( buf ), "&w[ %s &w] %s%s%s&w\n\r",
class,
(wch->desc && wch->desc->connected) ? "" : "",
wch->name,
wch->pcdata->title );
else
send_to_pager( "&w\n\r[--------5----------------------------------------------------------------]\n\r", ch);
if ( wch->level < (MAX_LEVEL - 15))
send_to_pager( "&w\n\r[------------------------------------------------------------------------]\n\r", ch ),
sprintf( buf + strlen( buf ), "&w[%2d %s %-10s&w] %s%s&w\n\r",
wch->level,
class,
(wch->desc && wch->desc->connected) ? "" : "",
wch->name,
wch->pcdata->title );
else
send_to_pager( "&w\n\r[--------4----------------------------------------------------------------]\n\r", ch);
}
sprintf( buf2, "\n\r&w[------------------------------------------------------------------------]\n\r&BYou see &W%d &Bplayer%s in the game.\n\r",
nMatch, nMatch == 1 ? "" : "s" );
strcat( buf, buf2 );
send_to_char( buf, ch );
return;
}
and here's the output:
look at next message | | Top |
|
| Posted by
| Ithildin
USA (262 posts) Bio
|
| Date
| Reply #4 on Fri 26 Mar 2004 06:14 AM (UTC) Amended on Fri 26 Mar 2004 06:40 AM (UTC) by Ithildin
|
| Message
| here's what i'm getting.
[--------4----------------------------------------------------------------]
[--------5----------------------------------------------------------------]
[------------------------------------------------------------------------]
[ Supreme Entity ] Ithildin the head cheese
[35 Cleric ] Gomer the High Priest of the Heavens
[------------------------------------------------------------------------]
You see 2 players in the game.
what i'm wanting is:
[---------------------Immortals--------------------]
[Supreme Intity ] Ithildin ]
[--------------------------------------------------]
[---------------------Mortals----------------------]
[ 10 Cleric ] Player ]
[ 15 Ranger ] Player ]
[ 28 Mage ] Player ]
[--------------------------------------------------]
You see 3 players in the game.
The high players this reboot was 25.
i'm not sure what's goin on here...i can see that i'm on the right path, just need to know where to put my lines.
| | Top |
|
| Posted by
| Greven
Canada (835 posts) Bio
|
| Date
| Reply #5 on Fri 26 Mar 2004 07:57 AM (UTC) |
| Message
| | I dunno fully, but I beleive the problem comes in that your having to paste the info in the order that the descriptors are read. In my version of do_who it uses linked lists, and sort what category the info goes into, and then displays all newbies, then all players, then all imms. You may need to do something similiar. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | | Top |
|
| Posted by
| Ithildin
USA (262 posts) Bio
|
| Date
| Reply #6 on Fri 26 Mar 2004 01:36 PM (UTC) |
| Message
| | yea, that's what the stock smaug who does. i've been looking at it, but i want to do away with all the if checks. i just want my immortals separate from my mortals. in the end i'm going to do away with all the deadly nice flags. i just want them all to be seen on one who list. | | Top |
|
| Posted by
| Greven
Canada (835 posts) Bio
|
| Date
| Reply #7 on Fri 26 Mar 2004 04:02 PM (UTC) |
| Message
| | Oh, k, well the stock SWR do_who is alot more like that. It shows everyone thats on, assuming that they are not wizinvis. All you would have to do is remove a few of the extra checks, it has optional "just clan" or "just immortal", but it defaults to everyone. The immortal list could just be thrown onto the top of the list, above newbies and players, if thats the way you wanted it. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | | Top |
|
| Posted by
| Ithildin
USA (262 posts) Bio
|
| Date
| Reply #8 on Sat 27 Mar 2004 02:50 AM (UTC) |
| Message
| yea, i'm using an envy who function right now. but all it shows is just the players on. no seperation or anything. so i've just kind of tried to add my own stuff. but to no avail. i just need some help on what 'im doin wrong.
Ithildin | | Top |
|
| Posted by
| Ithildin
USA (262 posts) Bio
|
| Date
| Reply #9 on Sat 27 Mar 2004 06:23 AM (UTC) |
| Message
| ok, i switched over to the stock smaugfuss who again. modified it and here's what i got:
if ( first_imm )
{
if ( !ch )
fprintf( whoout, "&w\n\r &WImmortals&w \n\r&w[----------------------------------------------------------------------------]\n\r" );
else
send_to_pager( "&w\n\r &WImmortals&w \n\r&w[----------------------------------------------------------------------------]\n\r", ch );
}
for ( cur_who = first_imm; cur_who; cur_who = next_who )
{
if ( !ch )
fprintf( whoout, cur_who->text );
else
send_to_pager( cur_who->text, ch );
next_who = cur_who->next;
DISPOSE( cur_who->text );
DISPOSE( cur_who );
send_to_pager( "&w[----------------------------------------------------------------------------]\n\r",ch );
}
if ( first_mortal )
{
if ( !ch )
fprintf( whoout, "&w\n\r\n\r &WMortals&w \n\r&w[----------------------------------------------------------------------------]\n\r" );
else
send_to_pager( "&w\n\r\n\r &WMortals&w \n\r&w[----------------------------------------------------------------------------]\n\r", ch );
}
for ( cur_who = first_mortal; cur_who; cur_who = next_who )
{
if ( !ch )
fprintf( whoout, cur_who->text );
else
send_to_pager( cur_who->text, ch );
next_who = cur_who->next;
DISPOSE( cur_who->text );
DISPOSE( cur_who );
}
if ( !ch )
{
fprintf( whoout, "&w[----------------------------------------------------------------------------]\n\r&BYou see &W%d &Bplayer%s in the game.\n\r", nMatch, nMatch == 1 ? "" : "s" );
fclose( whoout );
return;
}
set_char_color( AT_YELLOW, ch );
ch_printf( ch, "&w[----------------------------------------------------------------------------]\n\r&BYou see &W%d &Bplayer%s in the game.\n\r", nMatch, nMatch == 1 ? "" : "s" );
return;
}
here's my output:
with 1 player
Mortals
[----------------------------------------------------------------------------]
[ 35 Cleric ] Gomer the High Priest of the Heavens.
[----------------------------------------------------------------------------]
You see 1 player in the game.
with 2 players
Immortals
[----------------------------------------------------------------------------]
[Supreme Entity] Ithildin the head cheese.
[----------------------------------------------------------------------------]
Mortals
[----------------------------------------------------------------------------]
[ 35 Cleric ] Gomer the High Priest of the Heavens.
[----------------------------------------------------------------------------]
when only one player is on i want it to show the whole who function like this.
Immortals
[----------------------------------------------------------------------------]
[----------------------------------------------------------------------------]
Mortals
[----------------------------------------------------------------------------]
[ 35 Cleric ] Gomer the High Priest of the Heavens.
[----------------------------------------------------------------------------]
any thoughts? i'm getting closer...heh
| | Top |
|
| Posted by
| Greven
Canada (835 posts) Bio
|
| Date
| Reply #10 on Sat 27 Mar 2004 08:38 AM (UTC) |
| Message
| Yeah, just change them to look something like this: if ( !ch )
fprintf( whoout, "&w\n\r &WImmortals&w \n\r&w[----------------------------------------------------------------------------]\n\r" );
else
send_to_pager( "&w\n\r &WImmortals&w \n\r&w[----------------------------------------------------------------------------]\n\r", ch );
if ( first_imm )
send_to_pager( "\n\r", ch );
for ( cur_who = first_imm; cur_who; cur_who = next_who )
{
if ( !ch )
fprintf( whoout, cur_who->text );
else
send_to_pager( cur_who->text, ch );
next_who = cur_who->next;
DISPOSE( cur_who->text );
DISPOSE( cur_who );
}
send_to_pager( "&w[----------------------------------------------------------------------------]\n\r",ch );
if ( !ch )
fprintf( whoout, "&w\n\r\n\r &WMortals&w \n\r&w[----------------------------------------------------------------------------]\n\r" );
else
send_to_pager( "&w\n\r\n\r &WMortals&w \n\r&w[----------------------------------------------------------------------------]\n\r", ch );
if ( first_mortal )
send_to_pager( "\n\r", ch );
for ( cur_who = first_mortal; cur_who; cur_who = next_who )
{
if ( !ch )
fprintf( whoout, cur_who->text );
else
send_to_pager( cur_who->text, ch );
next_who = cur_who->next;
DISPOSE( cur_who->text );
DISPOSE( cur_who );
}
if ( !ch )
{
fprintf( whoout, "&w[----------------------------------------------------------------------------]\n\r&BYou see &W%d &Bplayer%s in the game.\n\r", nMatch, nMatch == 1 ? "" : "s" );
fclose( whoout );
return;
}
set_char_color( AT_YELLOW, ch );
ch_printf( ch, "&w[----------------------------------------------------------------------------]\n\r&BYou see &W%d &Bplayer%s in the game.\n\r", nMatch, nMatch == 1 ? "" : "s" );
return;
}
I beleive something like that is what your looking for. Dunno if it will work cleanly, but it should. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | | Top |
|
| Posted by
| Ithildin
USA (262 posts) Bio
|
| Date
| Reply #11 on Sat 27 Mar 2004 05:22 PM (UTC) |
| Message
| what exactly does the
if ( first_mortal )
{
if ( !ch )
fprintf( whoout, "&w\n\r\n\r &WMortals&w \n\r&w[----------------------------------------------------------------------------]\n\r" );
do?
does it mean that if there is no character then show the fprint? it never seemed to do that when i didn't have another player on. here's my code now though.
send_to_pager( "&w\n\r &WImmortals&w \n\r", ch );
send_to_pager( "&w[----------------------------------------------------------------------------]\n\r", ch );
if ( first_imm )
{
if ( !ch )
fprintf( whoout, "&w\n\r &WImmortals&w \n\r&w[----------------------------------------------------------------------------]\n\r" );
else
send_to_pager( "", ch );
}
for ( cur_who = first_imm; cur_who; cur_who = next_who )
{
if ( !ch )
fprintf( whoout, cur_who->text );
else
send_to_pager( cur_who->text, ch );
next_who = cur_who->next;
DISPOSE( cur_who->text );
DISPOSE( cur_who );
}
send_to_pager( "\n\r&w[----------------------------------------------------------------------------]\n\r",ch );
send_to_pager( "&w\n\r\n\r &WMortals&w \n\r", ch );
send_to_pager( "&w[----------------------------------------------------------------------------]\n\r", ch );
if ( first_mortal )
{
if ( !ch )
fprintf( whoout, "&w\n\r\n\r &rMortals&w \n\r&w[----------------------------------------------------------------------------]\n\r" );
else
send_to_pager( "", ch );
}
for ( cur_who = first_mortal; cur_who; cur_who = next_who )
{
if ( !ch )
fprintf( whoout, cur_who->text );
else
send_to_pager( cur_who->text, ch );
next_who = cur_who->next;
DISPOSE( cur_who->text );
DISPOSE( cur_who );
}
if ( !ch )
{
fprintf( whoout, "\n\r&b[----------------------------------------------------------------------------]\n\r&BYou see &W%d &Bplayer%s in the game.\n\r", nMatch, nMatch == 1 ? "" : "s" );
fclose( whoout );
return;
}
set_char_color( AT_YELLOW, ch );
ch_printf( ch, "\n\r&w[----------------------------------------------------------------------------]\n\r&BYou see &W%d &Bplayer%s in the game.\n\r", nMatch, nMatch == 1 ? "" : "s" );
return;
}
here's my output:
Immortals
[----------------------------------------------------------------------------]
[Supreme Entity] Ithildin the head cheese.
[----------------------------------------------------------------------------]
Mortals
[----------------------------------------------------------------------------]
[ 35 Cleric ] Gomer the High Priest of the Heavens.
[----------------------------------------------------------------------------]
You see 2 players in the game.
and with only 1 player:
Immortals
[----------------------------------------------------------------------------]
[----------------------------------------------------------------------------]
Mortals
[----------------------------------------------------------------------------]
[ 35 Cleric ] Gomer the High Priest of the Heavens.
[----------------------------------------------------------------------------]
You see 1 player in the game.
ok, my first question. What does the if function above do? i changed the output colors to see if it would show up, but it never did.
second question will be in next message... | | Top |
|
| Posted by
| Ithildin
USA (262 posts) Bio
|
| Date
| Reply #12 on Sat 27 Mar 2004 05:27 PM (UTC) |
| Message
| second question. when no immortal is on and only players, it looks fine. it's how i want it. vice versa when only imms on and no mortals. i have an extra return in between the dashed lines like so..
Immortals
[----------------------------------------------------------------------------]
[----------------------------------------------------------------------------]
Mortals
[----------------------------------------------------------------------------]
[ 35 Cleric ] Gomer the High Priest of the Heavens.
[----------------------------------------------------------------------------]
You see 1 player in the game.
problem is the return after the mortal and after the imm once he's on. i can't really explain this any better. here's how i want it to look.
Immortals
[----------------------------------------------------------------------------]
[Supreme Entity] Ithildin the head cheese.
[----------------------------------------------------------------------------]
Mortals
[----------------------------------------------------------------------------]
[ 35 Cleric ] Gomer the High Priest of the Heavens.
[----------------------------------------------------------------------------]
You see 2 players in the game.
is there any way to go about this? need more explanation?
| | Top |
|
| Posted by
| Ithildin
USA (262 posts) Bio
|
| Date
| Reply #13 on Mon 29 Mar 2004 06:19 AM (UTC) |
| Message
| i just added the race into the who list. now it comes out with the race. i want the race and class to have color in it. is there anyway i can do this? has anyone tried it? so when you type who it shows
&w[ &W45 &YCleric&w] Gomer (&ODwarf&w)
&w[ &W23 &PMage &w] Camilla (&pDrow&w)
how would i put color in there? the classes and races would switch color based on what they were.
any suggestions?
Thanks,
Ithildin
| | Top |
|
| Posted by
| Ithildin
USA (262 posts) Bio
|
| Date
| Reply #14 on Mon 29 Mar 2004 07:38 AM (UTC) |
| Message
| i put this in the who function, but it doesn't work.
switch ( wch->class )
{
default: break;
case MAX_CLASS - 0: class = "&PMage "; break;
case MAX_CLASS - 1: class = "&YCleric "; break;
case MAX_CLASS - 2: class = "&RThief "; break;
case MAX_CLASS - 3: class = "&bWarrior "; break;
case MAX_CLASS - 4: class = "&zVampire "; break;
case MAX_CLASS - 5: class = "&GDruid "; break;
case MAX_CLASS - 6: class = "&gRanger "; break;
case MAX_CLASS - 7: class = "&OAugurer "; break;
case MAX_CLASS - 8: class = "&WPaladin "; break;
}
am i at least on the right track? | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
125,980 views.
This is page 1, subject is 4 pages long: 1 2
3
4
It is now over 60 days since the last post. This thread is closed.
Refresh page
top