if (GET_ALIGNMENT(ch) <= 502 && GET_ALIGNMENT(ch) >= 1000)
send_to_char(ch, " Alignment : Chaotic Good \r\n");
if (GET_ALIGNMENT(ch) <= 102 && GET_ALIGNMENT(ch) >= 501)
send_to_char(ch, " Alignment : Lawful Good \r\n");
#define ALIGN_MAX_C_GOOD 1000
#define ALIGN_MIN_C_GOOD 500
#define ALIGN_MAX_L_GOOD 449
#define ALIGN_MIN_L_GOOD 250
#define ALIGN_MAX_NEUTRAL 249
#define ALIGN_MIN_NEUTRAL -249
#define ALIGN_MIN_L_EVIL -250
#define ALIGN_MAX_L_EVIL -449
#define ALIGN_MIN_C_EVIL -500
#define ALIGN_MAX_C_EVIL -1000
if (GET_ALIGNMENT(ch) <=ALIGN_ MAX_C_GOOD && GET_ALIGNMENT(ch) >= ALIGN_MIN_C_GOOD)
send_to_char(ch, " Alignment : Chaotic Good \r\n");
if (GET_ALIGNMENT(ch) <= ALIGN_MAX_L_GOOD && GET_ALIGNMENT(ch) >= ALIGN_MIN_L_GOOD)
send_to_char(ch, " Alignment : Lawful Good \r\n");
if (GET_ALIGNMENT(ch) <= ALIGN_MAX_NEUTRAL && GET_ALIGNMENT(ch) >= ALIGN_MIN_NEUTRAL)
send_to_char(ch, " Alignment : Neutral \r\n");
if (GET_ALIGNMENT(ch) <= ALIGN_MAX_L_EVIL && GET_ALIGNMENT(ch) >= ALIGN_MIN_L_EVIL)
send_to_char(ch, " Alignment : Lawful Evil \r\n");
if (GET_ALIGNMENT(ch) <= ALIGN_MAX_C_EVIL && GET_ALIGNMENT(ch) >= ALIGN_MIN_C_EVIL)
send_to_char(ch, " Alignment : Chaotic Evil \r\n");
#define IS_GOOD(ch) (GET_ALIGNMENT(ch) >= 350)
#define IS_EVIL(ch) (GET_ALIGNMENT(ch) <= -350)
#define IS_NEUTRAL(ch) (!IS_GOOD(ch) && !IS_EVIL(ch))
#define IS_GOOD(ch) (GET_ALIGNMENT(ch) >= 350)
#define IS_EVIL(ch) (GET_ALIGNMENT(ch) <= -350)
#define IS_NEUTRAL(ch) (!IS_GOOD(ch) && !IS_EVIL(ch))
/* character.c */
static const char* ch_alignment(CHAR_DATA *ch) {
/* handle alignment output */
}
const char* ch_display(CHAR_DATA *ch) {
char *buf = ch_alignment(ch);
/* grab any other values and append to output buffer */
return buf;
}
/* character.c */
static const char* ch_alignment(CHAR_DATA *ch) {
/* handle alignment output */
}
const char* ch_display(CHAR_DATA *ch) {
char *buf = ch_alignment(ch);
/* grab any other values and append to output buffer */
return buf;
}
ACMD(do_score)
{
const char* align2[ch]= {
if (GET_ALIGNMENT(ch) <= 502 && GET_ALIGNMENT(ch) >= 1000)
send_to_char(ch, "Chaotic Good\r\n");
if (GET_ALIGNMENT(ch) <= 102 && GET_ALIGNMENT(ch) >= 501)
send_to_char(ch, "Lawful Good\r\n");
if (GET_ALIGNMENT(ch) <= 101 && GET_ALIGNMENT(ch) >= -101)
send_to_char(ch, "Neutral\r\n");
if (GET_ALIGNMENT(ch) <= -102 && GET_ALIGNMENT(ch) >= -501)
send_to_char(ch, "Lawful Evil\r\n");
if (GET_ALIGNMENT(ch) <= -502 && GET_ALIGNMENT(ch) >= -1000)
send_to_char(ch, "Chaotic Evil\r\n");
}
send_to_char(ch, "Alignment: %d\r\n", align2[ch] );
}
const char* align2[ch]= {
if (GET_ALIGNMENT(ch) <= 502 && GET_ALIGNMENT(ch) >= 1000)
send_to_char(ch, "Chaotic Good\r\n");
if (GET_ALIGNMENT(ch) <= 102 && GET_ALIGNMENT(ch) >= 501)
send_to_char(ch, "Lawful Good\r\n");
if (GET_ALIGNMENT(ch) <= 101 && GET_ALIGNMENT(ch) >= -101)
send_to_char(ch, "Neutral\r\n");
if (GET_ALIGNMENT(ch) <= -102 && GET_ALIGNMENT(ch) >= -501)
send_to_char(ch, "Lawful Evil\r\n");
if (GET_ALIGNMENT(ch) <= -502 && GET_ALIGNMENT(ch) >= -1000)
send_to_char(ch, "Chaotic Evil\r\n");
}
I do not want to change the alignment code itself just the way it is displayed in score.
Here is what I come up with.
But it does not show the good alignments only the negative ones; neutral also works. This code could be smaller but I am new.
So any ideas on why it would do it?
Below is the full ACMD(do_score)
do_score