NEWBIE: Adding a time trigger for MOBPROGS.

From: Fionn Colvin (
Date: 06/06/96

Hi all,
       I'd like to add a new trigger for mob progs so mobs can do stuff 
depending on what the time is. I followed the outline in the docs for 
making a new trigger. Below is the function I added to mobprog.c. However 
it doesn't work. I know its a bit clumsy. Any ideas as to what I should 
be doing? Also at current I think that It will just keep doing the stuff 
in act_time while time is equal to whatever the arg for the prog is. How 
could I make it so it only does the command once per day?

Thanks for any help


PS I'm using circle 3 pl11. I used to following to test the trigger.

>time_prog 10~
Shout its 10am.

int mprog_time_trigger(struct char_data *mob)
  MPROG_DATA *mprg;

  for (mprg = mob_index[mob->nr].mobprogs; mprg != NULL; mprg = mprg->next)
    if (mprg->type & TIME_PROG) {
      if (time_info.hours == atoi(mprg->arglist))
        return 1;
        return -1;
  return -1;

This archive was generated by hypermail 2b30 : 12/18/00 PST