----------------------------------------------------------------- SMAUG Wanted Help Files 1.0 By Xerves (Released August 24, 1999) Xerves is the admin/owner of Rafermand (mud.rafermand.net port 3002) Website: http://www.rafermand.net Contact: xerves@rafermand.net ----------------------------------------------------------------- Orignally Written by: Absalom and Kiyo of Yrth. Contact: yrth@roscoe.mudservices.com. ----------------------------------------------------------------- What this command does is this. Everything a player types in a helpfile and it isn't found, it will show up in this file. A handy tool for helpfile creation, and can maybe help you change around some names and create new helpfiles. However, there is no sorting by simular titles, or anything, so the file can get big in a very alarming rate. In addition, I added support for checking and clearing the file online (like the bug/idea/typo commands, well I think 1 of them was like that with stock Smaug) ----------------------------------------------------------------- Files Needed: Act_info.c, Act_comm.c, Mud.h, Tables.c ----------------------------------------------------------------- 1. Act_comm.c Grep or search for do_typo, and right above that function, put this one /* Check the add helpfile file -- Xerves 8/24/99 */ void do_ahelp( CHAR_DATA *ch, char *argument ) { set_char_color( AT_PLAIN, ch ); if ( argument[0] == '\0' ) { send_to_char_color( "\n\rUsage: 'ahelp list' or 'ahelp clear now'\n\r", ch); return; } if ( !str_cmp( argument, "clear now" ) ) { FILE *fp = fopen( HELP_FILE, "w" ); if ( fp ) fclose( fp ); send_to_char_color( "Add Help file cleared.\n\r", ch); return; } if ( !str_cmp( argument, "list" ) ) { send_to_char_color( "\n\r VNUM \n\r.......\n\r", ch ); show_file( ch, HELP_FILE ); } else { send_to_char_color( "\n\rUsage: 'ahelp list' or 'ahelp clear now'\n\r", ch); return; } return; } 2. Act_info.c Find do_help, then find this at the very top of the function HELP_DATA *pHelp; Then add these lines right under it. char nohelp[MAX_STRING_LENGTH]; strcpy(nohelp, argument); /* For Finding "needed" helpfiles */ Next, just below is this if check... if ( (pHelp = get_help( ch, argument )) == NULL ) { send_to_char( "No help on that word.\n\r", ch ); return; } Right before the return, add this line append_file( ch, HELP_FILE, nohelp ); 3. Mud.h In the DECLARE_DO_FUN section (search or grep for it), add an entry for ahelp. Next, search for these lines #define CLASSDIR "../classes/" #define RACEDIR "../races/" After those two, add this line #define HELP_FILE "help.txt" /* For undefined helps */ 4. Tables.c Add the proper entries into the tables for ahelp. ----------------------------------------------------------------- Well that is all you need to do. When you login, use cedit to set the level on the ahelp command cedit ahelp create do_ahelp cedit ahelp level 61 cedit save cmdtable I recommend setting ahelp at a fairly high level. Having the ability to remove the contents online is a fairly powerful command, and there is no backup save feature in the code when it is deleted. I hope this helps some, and if you like the code, or see any bugs, or have any improvements, please contact me. (All the info is in the header of the file). (BTW: the help.txt file is in the /area directory)