New training. By Zortax...

to apply it, change the following files...

(There would be more info on this snippet, but this is how Zortax gave it
to me, and I can't be bothered with going through it all to document it, I'm
not even sure what advantages it gives over the standard training system..
standard "if you use it tell us" type stuff..)

-Voltec (Voltec@cyberdude.com)
-ZortaX (zortax@usa.net)


--- merc.h ---


add
---
#define STAT_NONE -1

change
------
sh_int train;

to
--
sh_int train[MAX_STAT];
sh_int training_type;
bool   training_set;

--- update.c ---

change
------

    ch->max_hit 	+= add_hp;
    ch->max_mana	+= add_mana;
    ch->max_move	+= add_move;
    ch->practice	+= add_prac;
    ch->train		+= 1;

to
--

    ch->train[ch->training_type] += 1;
    switch(ch->training_type)
    {
         case STAT_HP: add_hp += 10; break;
         case STAT_MANA: add_mana += 10; break;
         case STAT_MOVE: add_move += 10; break;
         case STAT_NONE: break;
         default: if( ch->train[ch->training_type] >= 4)
                  {
                      ch->perm_stat[ch->training_type] += 1;
                      ch->mod_stat[ch->training_type] += 1;
                      ch->train[ch->training_type] = 0;
                  } break;
    }
        
    ch->max_hit 	+= add_hp;
    ch->max_mana	+= add_mana;
    ch->max_move	+= add_move;
    ch->practice	+= add_prac;
    ch->training_set	= FALSE;
    ch->training_type   = STAT_NONE;

    ch->pcdata->perm_hit	+= add_hp;
    ch->pcdata->perm_mana	+= add_mana;
    ch->pcdata->perm_move	+= add_move;


--- act_move.c ---

delete do_train and add the new do_train.

void do_train(CHAR_DATA *ch, char *argument)
{
    char *arg;

    if(ch->training_set)
    {
        send_to_char("You are already training.\n\r", ch);
        return;
    }

    one_argument(arg, argument);

    if(arg[0] == 's' && arg[1] == 't' && arg[2] == 'r')
    {
       send_to_char("You start training your strength.\n\r", ch);
       ch->training_set = TRUE;
       ch->training_type = STAT_STR;
    }

    if(arg[0] == 'w' && arg[1] == 'i' && arg[2] == 's')
    {
       send_to_char("You start training your wisdom.\n\r", ch);
       ch->training_set = TRUE;
       ch->training_type = STAT_WIS;
    }

    if(arg[0] == 'i' && arg[1] == 'n' && arg[2] == 't')
    {
       send_to_char("You start training your intellect.\n\r", ch);
       ch->training_set = TRUE;
       ch->training_type = STAT_INT;
    }

    if(arg[0] == 'd' && arg[1] == 'e' && arg[2] == 'x')
    {
       send_to_char("You start training your dexterity.\n\r", ch);
       ch->training_set = TRUE;
       ch->training_type = STAT_DEX;
    }

    if(arg[0] == 'c' && arg[1] == 'o' && arg[2] == 'n')
    {
       send_to_char("You start training your constitution.\n\r", ch);
       ch->training_set = TRUE;
       ch->training_type = STAT_CON;
    }

    if(arg[0] == 'h' && arg[1] == 'p')
    {
       send_to_char("You start training your hitpoints.\n\r", ch);
       ch->training_set = TRUE;
       ch->training_type = STAT_HP;
    }

    if(arg[0] == 'm' && arg[1] == 'a' && arg[2] == 'n')
    {
       send_to_char("You start training your mana.\n\r", ch);
       ch->training_set = TRUE;
       ch->training_type = STAT_MANA;
    }

    if(( arg[0] == 'm' && arg[1] == 'o' && arg[2] == 'v')
    || ( arg[0] == 'm' && aarg[1] == 'v'))
    {
       send_to_char("You start training your movement.\n\r", ch);
       ch->training_set = TRUE;
       ch->training_type = STAT_MOVE;
    }
    
    return;
}
