----------------------------------------------------------------- SMAUG Skill Prototype 1.0 By Xerves (Released August 22, 1999) Xerves is the admin/owner of Rafermand (mud.rafermand.net port 3002) Website: http://www.rafermand.net Contact: xerves@rafermand.net ----------------------------------------------------------------- A very useful command for keeping track of any skills/spells that are made or changed. This command is more utility than blocking people from doing things. What the command will do is when a skill/spell is created, it will set it to prototype and attach the makers name on the skill. Then when you type slookup prototype, you will get a list of skills that are being worked on. The prototype is a number not a flag, so it really don't affect if the players can use the skill or not (well you could change that if wished). The prototype and creator sections can only be changed by high level immortals. Useful and should prove helpful in remembering who made what. ---------------------------------------------------------------- Files changed: Mud.h Skills.c Tables.c ---------------------------------------------------------------- 1. Mud.h IN struct skill_type Add char * made_char; /* Made by??? -- Xerves 8/7/99 */ sh_int prototype; /* Check for new spells/skills -- Xerves */ 2. Skills.c IN do_slookup After if ( !str_cmp( arg, "all" ) ) { for ( sn = 0; sn < top_sn && skill_table[sn] && skill_table[sn]->name; sn++ ) pager_printf( ch, "Sn: %4d Slot: %4d Skill/spell: '%-20s' Damtype: %s\n\r", sn, skill_table[sn]->slot, skill_table[sn]->name, spell_damage[SPELL_DAMAGE( skill_table[sn] )] ); } Add else if ( !str_cmp( arg, "prototype" ) ) { pager_printf(ch, " Sn Name Creator \n\r"); pager_printf(ch, "------------------------------------------\n\r"); for ( sn = 0; sn < top_sn && skill_table[sn] && skill_table[sn]->name; sn++ ) if (skill_table[sn]->prototype > 0) { pager_printf( ch, "%4d %-20s %-15s\n\r", sn, skill_table[sn]->name, skill_table[sn]->made_char ); } } After ch_printf( ch, "Sn: %4d Slot: %4d %s: '%-20s'\n\r", sn, skill->slot, skill_tname[skill->type], skill->name ) Add if ( skill->prototype ) ch_printf( ch, "Prototype: %s ", (skill->prototype == 0) ? "No" : "Yes"); if ( skill->made_char ) ch_printf( ch, "Made By: %s ", skill->made_char); ch_printf( ch, "\n\r"); IN do_sset After skill->min_mana = 0; skill->name = str_dup( argument ); skill->noun_damage = str_dup( "" ); skill->msg_off = str_dup( "" ); skill->spell_fun = spell_smaug; skill->type = type; Add skill->prototype = 1; skill->made_char = ch->name; After if ( !str_cmp( arg2, "name" ) ) { DISPOSE(skill->name); skill->name = str_dup( argument ); send_to_char( "Ok.\n\r", ch ); return; } Add if ( !str_cmp( arg2, "prototype" ) ) { int pro = atoi( argument ); if ( get_trust(ch) <= LEVEL_GREATER ) /* Level 61 Or Higher */ { send_to_char( "Sorry, only staff can change this.\n\r", ch); return; } if (pro > 1 || pro < 0) { send_to_char( "0 for no, 1 for yes\n\r", ch); return; } skill->prototype = atoi( argument ); send_to_char( "Ok.\n\r", ch ); return; } if ( !str_cmp( arg2, "madeby" ) ) { if ( get_trust(ch) <= LEVEL_GREATER ) /* Level 61 or Higher */ { send_to_char( "Sorry, only staff can change this.\n\r", ch); return; } DISPOSE(skill->made_char); skill->made_char = str_dup( argument ); send_to_char( "Ok.\n\r", ch ); return; } 3. Tables.c IN void fwrite_skill( FILE *fpout, SKILLTYPE *skill ) After fprintf( fpout, "Info %d\n", skill->info ); Add if ( skill->made_char && skill->made_char[0] != '\0' ) fprintf( fpout, "MadeBy %s~\n", skill->made_char ); if ( skill->prototype ) fprintf( fpout, "Prototype %d\n", skill->prototype ); IN SKILLTYPE *fread_skill( FILE *fp ) After case 'M': Add KEY( "MadeBy", skill->made_char, fread_string_nohash( fp ) ); After case 'P': KEY( "Participants",skill->participants, fread_number( fp ) ); Add KEY( "Prototype", skill->prototype, fread_number( fp ) ); -------------------------------------------------------------------------- Thats mainly it, when an immortal of yours creates a skill/spell/weapon/etc, it will show up on slookup prototype with the Sn/Skill Name/Creator. Only immortals of level 61 or up can change this prototype and creator if needed. Prototype works as if it was a bool. 0 is No, 1 is Yes. See above to change the levels or anything on the prototype if wanted. This code was installed into a modified Smaug 1.4 and SHOULD work on most versions and types. If there are any problems, please contact me. All that information is above.