something like this may work:
int i;
for (i=0;aff_table[i].name != NULL;i++)
{
if (IS_SET(race_table[ch->race].aff,aff_table[i].bit))
{
sprintf(buf,"[::Race ::] %-15s\n\r",aff_table[i].name);
send_to_char(buf,ch);
}
}
Of course, you'd have to have an aff_table[] or the like set up, but I think
there is one in tables.c (I know there's a table with OLC that will fill the
requirements - maybe the one used to set mob stuff in OLC...)
-----Original Message-----
From: Mallek [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 16, 2002 7:26 AM
To: [email protected]
Subject: Race Affects
I'm trying to break up the input I get from:
if ( race_table[ch->race].aff != 0 && IS_AFFECTED
( ch, race_table[ch->race].aff ) )
{
sprintf( buf, "[::Race ::] %-15s\n",
flag_string ( affect_flags, race_table[ch->race].aff ) );
send_to_char( buf, ch );
}
Current Output:
[::Race ::] infrared haste regeneration
I would like it to read:
[::Race ::] infrared : Racial Affect
[::Race ::] haste : Racial Affect
[::Race ::] regeneration : Racial Affect
Was wondering the best way to go about this. I can't break up the racial
affects any other way. I was thinking of taking something like one_argument
and captuering each one 1 at a time however i'm not sure if this is correct.
This function is to modify do_affects
Thanks in advance,
Mallek
Linux Redhat 7.0
Rom 2.4b6 modified
Affect2 bits added
--
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom