updates, please help

Posted by Matt on Wed 08 Aug 2001 01:22 PM — 2 posts, 12,191 views.

#0
i added a function and a stat to my mud called pl, i have it declared and i can get it to appear in the prompt and all that... i have added this to update.c

void pl_update(CHAR_DATA *ch)
{
ch->pl = (ch->max_hit * ch->max_move) / 10;
return;
}

which is the function based on what pl is calculated at... i want it to update every second, but cannot figure out how to do it, would you be able to help me.. i would be very greatful, thanx

matt
Australia Forum Administrator #1
I would add it to the function char_check, which periodically checks every character:




/*
 * Function to check important stuff happening to a player
 * This function should take about 5% of mud cpu time
 */
void char_check( void )
{

... [snip] ....


    if ( IS_NPC( ch ) )
    {

... [snip mob handling stuff] ....


    }
    else
    {

    pl_update (ch);