Pages:<< prev 1 next >>
#1 Feb 2, 2007 1:28 am
Last edited Feb 2, 2007 12:34 pm by Anavel
Apprentice
GroupMembers
Posts24
JoinedMar 6, 2005
Object progs that don't have a high success rate (anything other than 100) will not show any output when a player triggers it. Might be a bug; might not be. Depends on how you look at it.
In mud_prog.c find:
And replace with:
In mud_prog.c find:
bool oprog_percent_check( CHAR_DATA * mob, CHAR_DATA * actor, OBJ_DATA * obj, void *vo, int type ) { MPROG_DATA *mprg; bool executed = FALSE; for ( mprg = obj->pIndexData->mudprogs; mprg; mprg = mprg->next ) if ( mprg->type == type && ( number_percent( ) <= atoi( mprg->arglist ) ) ) { executed = TRUE; mprog_driver( mprg->comlist, mob, actor, obj, vo, FALSE ); if ( type != GREET_PROG ) break; } return executed; }
And replace with:
bool oprog_percent_check( CHAR_DATA * mob, CHAR_DATA * actor, OBJ_DATA * obj, void *vo, int type ) { MPROG_DATA *mprg; bool executed = FALSE; for ( mprg = obj->pIndexData->mudprogs; mprg; mprg = mprg->next ) if ( mprg->type == type && ( number_percent( ) <= atoi( mprg->arglist ) ) ) { executed = TRUE; mprog_driver( mprg->comlist, mob, actor, obj, vo, FALSE ); if ( type != GREET_PROG ) break; } else if ( type == PUSH_PROG || type == PULL_PROG ) send_to_char( "Nothing happens...\n\r", actor ); return executed; }
#2 Feb 2, 2007 1:56 am
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007
Won't this cause problems for programs that aren't explicitly triggered by players? I'm thinking e.g. of entry programs. You wouldn't want "Nothing happens..." printed to the player because an implicit program didn't make its roll.
#3 Feb 2, 2007 12:32 pm
Last edited Feb 2, 2007 12:33 pm by Anavel
Apprentice
GroupMembers
Posts24
JoinedMar 6, 2005
Yeah that could cause some issues. Thanks for pointing that out.
Pages:<< prev 1 next >>