Instalation instructions for Smaug1.4. It works with stock smaug1.4. Modifications MAY be needed to get it to work for your mud, although chances are it will work without a prob :) --- Note: If you are currently using v1.0, search through this file for any comments which mention v1.2. Simply add those sections and you should be set. --- Joe in mud.h search for: ACT_TRAIN If it's not there search for ACT_PET and add ACT_TRAIN XX to that list. XX being an unused number. (0-31) Later in mud.h search for: DECLARE_DO_FUN( do_track ); and below that line add: DECLARE_DO_FUN( do_train ); --- Then in build.c search for: act_flags and in the slot that you added the train flag in mud.h, and put: train inside the correct pair of quotes. It MAY already be here, but I'd check to make sure it's in the right spot. In tables.c search for: if ( !str_cmp( name, "do_track" )) return do_track; and below that line add: if ( !str_cmp( name, "do_train" )) return do_train; Later in tables.c search for: if ( skill == do_track ) return "do_track"; and below that line add: if ( skill == do_train ) return "do_train"; --- (you don't have to put this in act_info.c at any specific place, but I figured I'd put it near do_practice) In act_info.c search for: /* * Place any skill types you don't want them to be able to practice * normally in this list. Separate each with a space. * (Uses an is_name check). -- Altrag */ and right BEFORE that add this big chunk of code (the do_train function): /*****************************************************************\ * This is do_train ported over from Merc 2.1 to Smaug1.4 * * by Joe Fabiano. If you have any questions about this snippet, * * email them to: rinthos@yahoo.com. Enjoy. :) --Joe * ******************************************************************* * Train v1.0 * \*****************************************************************/ void do_train( CHAR_DATA *ch, char *argument ) { char buf[MAX_STRING_LENGTH]; CHAR_DATA *mob; int hp_gain = 0; int mana_gain = 0; int move_gain = 0; /* added for v1.2 */ sh_int *pAbility; char *pOutput; int cost; /* the cost is in the form of practices (not gold). -Joe */ if ( IS_NPC(ch) ) return; /* * Check for trainer. */ for ( mob = ch->in_room->first_person; mob; mob = mob->next_in_room ) { if ( IS_NPC(mob) && xIS_SET(mob->act, ACT_TRAIN) ) break; } if ( mob == NULL ) { send_to_char( "You can't do that here.\n\r", ch ); return; } if ( argument[0] == '\0' ) { sprintf( buf, "You have %d practice sessions.\n\r", ch->practice ); argument = "foo"; } cost = 5; /* the number of practices it costs to train an attribute that is not your prime attribute. * Hp and Mana costs for training aren't affected by this setting. -Joe */ if ( !str_cmp( argument, "str" ) ) { if ( class_table[ch->class]->attr_prime == APPLY_STR ) cost = 3; /* the cost to train strength if it is the prime attribute of your class -Joe*/ pAbility = &ch->perm_str; pOutput = "strength"; } else if ( !str_cmp( argument, "int" ) ) { if ( class_table[ch->class]->attr_prime == APPLY_INT ) cost = 3; /* the cost to train intelligence if it is the prime attribute of your class -Joe*/ pAbility = &ch->perm_int; pOutput = "intelligence"; } else if ( !str_cmp( argument, "wis" ) ) { if ( class_table[ch->class]->attr_prime == APPLY_WIS ) cost = 3; /* the cost to train wisdom if it is the prime attribute of your class -Joe*/ pAbility = &ch->perm_wis; pOutput = "wisdom"; } else if ( !str_cmp( argument, "dex" ) ) { if ( class_table[ch->class]->attr_prime == APPLY_DEX ) cost = 3; /* the cost to train dexterity if it is the prime attribute of your class -Joe*/ pAbility = &ch->perm_dex; pOutput = "dexterity"; } else if ( !str_cmp( argument, "con" ) ) { if ( class_table[ch->class]->attr_prime == APPLY_CON ) cost = 3; /* the cost to train constitution if it is the prime attribute of your class -Joe*/ pAbility = &ch->perm_con; pOutput = "constitution"; } else if ( !str_cmp( argument, "cha" ) ) { if ( class_table[ch->class]->attr_prime == APPLY_CHA ) cost = 3; /* the cost to train charisma if it is the prime attribute of your class -Joe */ pAbility = &ch->perm_cha; pOutput = "charisma"; } else if ( !str_cmp( argument, "lck" ) ) { if ( class_table[ch->class]->attr_prime == APPLY_LCK ) cost = 3; /* the cost to train luck if it is the prime attribute of your class -Joe*/ pAbility = &ch->perm_lck; pOutput = "luck"; } else if ( !str_cmp( argument, "hp" ) ) { pAbility = &ch->max_hit; pOutput = "number of hit points"; cost = 6; /* this is cost to train hp once -Joe*/ hp_gain = 10; /* this is hp gained by training hp once -Joe*/ } /* new in v1.2 */ else if ( !str_cmp( argument, "move" ) ) { pAbility = &ch->max_move; pOutput = "amount of movement"; cost = 6; move_gain = 10; } else if ( !str_cmp( argument, "mana" ) ) { pAbility = &ch->max_mana; pOutput = "amount of mana"; cost =6; /* this is the cost to train mana once -Joe*/ mana_gain = 10; /* this is the mana gained by training mana once -Joe*/ } else { /* added move here for v1.2 */ strcpy( buf, "You can train: hp mana move" ); if ( ch->perm_str < 18 ) strcat( buf, " str" ); if ( ch->perm_int < 18 ) strcat( buf, " int" ); if ( ch->perm_wis < 18 ) strcat( buf, " wis" ); if ( ch->perm_dex < 18 ) strcat( buf, " dex" ); if ( ch->perm_con < 18 ) strcat( buf, " con" ); if ( ch->perm_cha < 18 ) strcat( buf, " cha" ); if ( ch->perm_lck < 18 ) strcat( buf, " lck" ); strcat( buf, ".\n\r" ); send_to_char( buf, ch ); return; } if ( !str_cmp( argument, "hp" ) ) { if ( cost > ch->practice ) { send_to_char( "You don't have enough practices.\n\r", ch ); return; } ch->practice -= cost; *pAbility += hp_gain; act(AT_RED, "Your $T increases!", ch, NULL, pOutput, TO_CHAR ); act(AT_RED, "$n's $T increases!", ch, NULL, pOutput, TO_ROOM ); return; } /* added this for v1.2 */ if ( !str_cmp( argument, "move" ) ) { if ( cost > ch->practice ) { send_to_char( "You don't have enough practices.\n\r", ch ); return; } ch->practice -= cost; *pAbility += move_gain; act(AT_RED, "Your $T increases!", ch, NULL, pOutput, TO_CHAR ); act(AT_RED, "$n's $T increases!", ch, NULL, pOutput, TO_ROOM ); return; } if ( !str_cmp( argument, "mana" ) ) { if ( cost > ch->practice ) { send_to_char( "You don't have enough practices.\n\r", ch ); return; } ch->practice -= cost; *pAbility += mana_gain; act(AT_RED, "Your $T increases!", ch, NULL, pOutput, TO_CHAR ); act(AT_RED, "$n's $T increases!", ch, NULL, pOutput, TO_ROOM ); return; } if ( *pAbility >= 18 ) /* 18 is the max you can train something to unless you change it here -Joe */ { act(AT_RED, "Your $T is already at maximum.", ch, NULL, pOutput, TO_CHAR ); return; } if ( cost > ch->practice ) { send_to_char( "You don't have enough practices.\n\r", ch ); return; } ch->practice -= cost; *pAbility += 1; act(AT_RED, "Your $T increases!", ch, NULL, pOutput, TO_CHAR ); act(AT_RED, "$n's $T increases!", ch, NULL, pOutput, TO_ROOM ); return; } /* the end of the train snippet -Joe*/ --- Now all you have to do is: make clean make smaug And you should be set :) After you start your mud up, type: cedit train create do_train cedit train level 1 cedit save cmdtable Then find a mob that you want to be a "trainer" and type: mset flags train REMEMBER TO SAVE THE AREA (so the mob saves with the flag after reboots etc)