Since I just modified this in my copy here is a slightly modified give program to make it a little better.
void mprog_give_trigger( CHAR_DATA *mob, CHAR_DATA *ch, OBJ_DATA *obj )
{
MPROG_DATA *mprg;
char buf[MIL];
int vnum;
if( is_npc( mob ) && can_see( mob, ch ) && HAS_PROG( mob->pIndexData, GIVE_PROG ) )
{
/* Don't let a mob trigger itself, nor one instance of a mob trigger another instance. */
if( is_npc( ch ) && ch->pIndexData == mob->pIndexData )
return;
for( mprg = mob->pIndexData->mudprogs; mprg; mprg = mprg->next )
{
one_argument( mprg->arglist, buf );
vnum = -1;
if( is_number( buf ) )
vnum = atoi( buf );
if( mprg->type == GIVE_PROG && ( !str_cmp( obj->name, buf ) || !str_cmp( "all", buf ) || ( vnum != -1 && obj->pIndexData->vnum == vnum ) ) )
{
mprog_driver( mprg->comlist, mob, ch, obj, NULL, false );
break;
}
}
}
}
This will allow you to use an object vnum and more then one for the same program etc...
Example:
mpedit <#> add give 'magic mushroom' '20' '30'
so if you gave the mobile an item named magic mushroom, item vnum 20 or 30 it would allow it to work.