Date: Sun, 08 Aug 1999 01:04:03 -0700 From: forrest Subject: Re: New Code Contribution Mythran ACMD(do_say) { char buf2[MAX_STRING_LENGTH]; skip_spaces(&argument); if (!*argument) { send_to_char("Yes, but WHAT do you want to say?\r\n", ch); return; } if (argument[strlen(argument) - 1] == '?') { sprintf(buf, "You ask, '%s'", argument); sprintf(buf2, "$n asks, '%s'", argument); } else if(argument[strlen(argument) - 1] == '!') { sprintf(buf, "You exclaim, '%s'", argument); sprintf(buf2, "$n exclaims, '%s'", argument); } else if (argument[strlen(argument) - 1] == '.' && argument[strlen(argument) - 2] == '.' && argument[strlen(argument) - 3] == '.') { argument[strlen(argument) - 2] = '\0'; /* remove this line if you want to keep the periods. */ sprintf(buf, "You mutter, '%s'", argument); sprintf(buf2, "$n mutters, '%s'", argument); } else { sprintf(buf, "You say, '%s'", argument); sprintf(buf2, "$n says, '%s'", argument); } if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_NOREPEAT)) send_to_char(OK, ch); else { act(buf, FALSE, ch, 0, 0, TO_CHAR); // act(buf2, FALSE, ch, 0, argument, TO_ROOM); /*remove the next line and uncomment the line above if you don't have dg_scripts */ act(buf2, FALSE, ch, 0, argument, TO_ROOM|DG_NO_TRIG); } /* Remove the next three lines if you don't have dg_scripts. */ /* trigger check */ speech_mtrigger(ch, argument); speech_wtrigger(ch, argument); }