Notes will now have the ability to use the string editor which is most commonly used for redit_desc. Also a new re-written do_description for those who like the idea, it also uses the string editor. The string editor is just simple and easier to use.
Note: This has ONLY been tested in Rom24b6's with note system, not on do_boards! Also you must have OLC installed or an instance of string.c otherwise this code will not work!
Author Note: I'm surprised I haven't seen this around in a while.. It seems there used to be a snippet for it a while back but I suppose someones taken it out or I wasn't thinking right. Anyway here it is.. I absolutely love it and enjoy so hope you do too.
Mallyrn of Aeternitas
Snippet
__________________________________________________
/*
in note.c under parse_note
look for:
*/
/* below this point only certain people can edit notes */
/* if ((type == NOTE_NEWS && !IS_TRUSTED(ch,ANGEL))
|| (type == NOTE_CHANGES && !IS_TRUSTED(ch,CREATOR)))
{
sprintf(buf,"You aren't high enough level to write %s.",list_name);
send_to_char(buf,ch);
return;
}
right after that add:
*/
if ( !str_cmp( arg, "write" ) )
{
string_append( ch, &ch->pnote->text );
return;
}
/*
Now if you want to make sure everyone HAS to use the editor for ease etc. You could also remove if ( !str_cmp( arg, "+" ) ) and if ( !str_cmp( arg, "-" ) )
What I did was replaced all it had with something like this:
*/
if ( !str_cmp( arg, "+" ) )
{
send_to_char("\n\rWe have a much easier way of doing notes now. Try using 'write' instead of '+'.\n\r", ch );
return;
}
/*
And
*/
if ( !str_cmp( arg, "-" ) )
{
send_to_char("\n\rWe have a much easier way of doing notes now. Try using 'write' instead of '-'.\n\r", ch );
return;
}
/* That's it for notes.
Now if you want to add this new re-write of do_descriptions it's alot easier as well.
in act_info.c at do_description delete it all and copy/paste this in.
*/
void do_description( CHAR_DATA *ch, char *argument )
{
char arg[MAX_INPUT_LENGTH];
one_argument( argument, arg );
if (IS_NPC(ch))
{
send_to_char("Come on now! MEdit this mob! Now return!\n\r", ch);
return;
}
if ( arg[0] == '\0' )
{
send_to_char("\n\rYour description of your character is:\n\r", ch );
send_to_char( ch->description, ch );
return;
}
if (!str_cmp(arg, "edit") )
{
string_append( ch, &ch->description );
return;
}
send_to_char("\n\rSyntax: 'desc' displays your current character description\n\r", ch );
send_to_char(" 'desc edit' lets you write your characters description\n\r", ch );
return;
}
/* That's it folks. I don't require anything to be left in or whatever.. This is free for the public call it yours if you want doesn't matter to me. Not like I can get any profit off of it anyway. =o)
If you have any questions feel free to e-mail me at aeternitas@programmer.net */