Hi List -
Im looking for some guidance. Its not a big deal but it would be great if I could get Capital Letters to remain intact in my SMAUG exit descriptions.
What I know -
pexit->keyword is called in 'do_open'
act(AT_PLAIN, "$n opens the $d.", ch, NULL, pexit->keyword, TO_ROOM);
/* act(AT_PLAIN, "You open the $d.", ch, NULL, pexit->keyword, TO_CHAR);*/
my solution to keep the caps for CH was :
ch_printf(ch, "You open the %s.\n\r", pexit->keyword);
It seems like when 'pexit->keyword' is called from the "act()" string, the parse is in lower case. Im not sure how deep to go to fix it.
Can someone teach me how to tell the room about $n opens the $d and keep the Capital Letters from getting crushed?
I tried something like :
sprintf( buf, "%s opens the %s.\n\r", ch->name, pexit->keyword );
but that resulted in nothing.
Here is the first portion of the function for reference (see my comments):
----------------------------------------------------------
void do_open(CHAR_DATA *ch, char *argument)
{
char buf[MAX_STRING_LENGTH];
char arg[MAX_INPUT_LENGTH];
OBJ_DATA *obj;
EXIT_DATA *pexit;
int door;
one_argument(argument, arg);
if(arg[0] == '\0')
{
send_to_char("Open what?\n\r", ch);
return;
}
if((pexit = find_door(ch, arg, TRUE)) != NULL)
{
/* 'open door' */
EXIT_DATA *pexit_rev;
if( IS_SET(pexit->exit_info, EX_SECRET)
&& pexit->keyword && !nifty_is_name(arg, pexit->keyword))
{ ch_printf(ch, "You see no %s here.\n\r", arg); return; }
if(!IS_SET(pexit->exit_info, EX_ISDOOR))
{ send_to_char("You can't do that.\n\r", ch); return; }
if(!IS_SET(pexit->exit_info, EX_CLOSED))
{ send_to_char("It's already open.\n\r", ch); return; }
if(IS_SET(pexit->exit_info, EX_LOCKED)
&&IS_SET(pexit->exit_info, EX_BOLTED))
{ send_to_char("The bolts locked.\n\r", ch); return; }
if(IS_SET(pexit->exit_info, EX_BOLTED))
{ send_to_char("It's bolted.\n\r", ch); return; }
if( IS_SET(pexit->exit_info, EX_LOCKED))
{ send_to_char("It's locked.\n\r", ch); return; }
if(!IS_SET(pexit->exit_info, EX_SECRET)
|| (pexit->keyword && nifty_is_name(arg, pexit->keyword)))
{
/*questioning this area*/
act(AT_PLAIN, "$n opens the $d.", ch, NULL, pexit->keyword, TO_ROOM);
/*substitute next line for ch_print below as a test/*
/* act(AT_PLAIN, "You open the $d.", ch, NULL, pexit->keyword, TO_CHAR);*/
/*this works well and as expected */
ch_printf(ch, "You open the %s.\n\r", pexit->keyword);
/*this yields no results*/
sprintf( buf, "%s opens the %s.\n\r", ch->name, pexit->keyword );
/*end questioning*/
if((pexit_rev = pexit->rexit) != NULL
&& pexit_rev->to_room == ch->in_room)
{
CHAR_DATA *rch;
for(rch = pexit->to_room->first_person; rch; rch = rch->next_in_room)
act(AT_PLAIN, "The $d opens.", rch, NULL, pexit_rev->keyword, TO_CHAR);
}
remove_bexit_flag(pexit, EX_CLOSED);
if((door=pexit->vdir) >= 0 && door < 10)
check_room_for_traps(ch, trap_door[door]);
return;
}
<<SNIP>>
|